Commit graph

3293 commits

Author SHA1 Message Date
Andrei Alexeyev
0055de4245
camcontrol: add cleanup
This is mostly to fix an annoying assertion failure that pops up when
quitting the game or restarting the stage.
2021-10-08 19:06:14 +03:00
Andrei Alexeyev
d3786e7cf7
stage3d: use dynarray for the positions buffer 2021-10-08 19:04:31 +03:00
Andrei Alexeyev
993bef8a2a
coroutine: add NOT_NULL_OR_DIE() convenience macro
Returns its argument if it's not a NULL pointer, otherwise cancels the
running task.
2021-09-22 20:41:39 +03:00
Lukas Weber
4e55d445f8
stage5: new PBR background
Co-authored-by: Andrei Alexeyev <akari@taisei-project.org>
2021-09-19 10:42:59 +03:00
Alice D
85e3cf0bd8
misc,ci: Machine files (#321) 2021-09-14 22:39:24 +03:00
Andrei Alexeyev
7987c7ce34
audio_sdl: remove some dead #defines 2021-09-02 14:54:39 +03:00
Andrei Alexeyev
6593f9c7fc
audio: separate mixer logic from SDL backend 2021-09-02 03:20:36 +03:00
Andrei Alexeyev
136292357d
audio: partial refactor
Move SFXPlayID and sfx loop handling logic into the front end.
2021-09-01 19:55:36 +03:00
Andrei Alexeyev
e471837d4e
pbr: support ambient occlusion maps
AO maps modulate environment light
2021-09-01 00:48:59 +03:00
Andrei Alexeyev
ecbf95ae31
pbr: optimize shader, mainly point lights 2021-09-01 00:48:59 +03:00
Andrei Alexeyev
fce0f97fe1
pbr: parallax occlusion mapping & better env lighting 2021-09-01 00:48:57 +03:00
Lukas Weber
8bb376cbd5
shaders: add envmap_reflect
Co-authored-by: Andrei Alexeyev <akari@taisei-project.org>
2021-09-01 00:47:14 +03:00
Andrei Alexeyev
78266ace3f
pbr: refactor material management and shader
Introduced a new PBRMaterial resource type. Materials are now fully
described with .material files instead of being hardcoded. Added some
functions to abstract away and simplify set up of PBR shaders.
2021-09-01 00:21:50 +03:00
Andrei Alexeyev
507080c604
scripts/mkbasis: renormalize normalmaps after preprocessing 2021-09-01 00:10:09 +03:00
Andrei Alexeyev
d857d30ef4
scripts/mkbasis: add --preprocess, --preprocess-late, --basisu-args 2021-09-01 00:10:03 +03:00
Lukas Weber
b3cd590673
shaders: remove duplicate color conv functions from texture_post_load 2021-09-01 00:08:14 +03:00
Andrei Alexeyev
142b4f25d4
Remove some trivial dead code 2021-08-31 23:34:48 +03:00
Andrei Alexeyev
9e297aa570
fix stupid gcc warnings 2021-08-31 23:34:48 +03:00
Andrei Alexeyev
8d2ee76710
replace include guards with #pragma once 2021-08-31 23:34:46 +03:00
Andrei Alexeyev
c49357ffef
fix deprecations 2021-08-31 23:33:16 +03:00
Andrei Alexeyev
93d779df43
macrohax: make MACROHAX_CONCAT useful and simplify a bunch of macros 2021-08-31 23:33:16 +03:00
Andrei Alexeyev
f7ed0befdf
coroutine: allow omitting the args struct when declaring tasks 2021-08-31 23:33:16 +03:00
Andrei Alexeyev
cf92f499cf
macrohax: add utilities for implementing macro overloads 2021-08-31 23:33:16 +03:00
Andrei Alexeyev
d89d0896e2
macrohax: add some argument-counting macros 2021-08-31 23:33:16 +03:00
Andrei Alexeyev
373edc33ba
coroutine: deprecate NO_ARGS and enhance macros with GNU extensions
Removed dummy char fields from arg structs, as their only purpose was to
hack around silly standard preprocessor limitations. { } should now be
used instead of NO_ARGS.
2021-08-31 23:33:16 +03:00
Andrei Alexeyev
f73b1d6891
Abandon standard C conformance and require GNU extensions
Removed the use_gnu_ext option as well as fallback paths for compilers
that don't support GNU extensions. To my knowledge, none of those
compilers support C11 to a sufficient extent to compile Taisei anyway,
and those fallbacks are very poorly tested.

Pedantic warnings are now disabled, and extensions that are common to
reasonably recent versions of GCC and clang are permitted to be relied
on (list of allowed extensions TBA).
2021-08-31 23:33:16 +03:00
Andrei Alexeyev
f3fcec70f6
stage1: fix bg for "fast" and "minimal" postprocess modes 2021-08-30 18:58:13 +03:00
Andrei Alexeyev
1ae8811bc4
lasers: improve collision; move to lasers/
Moved quantization out of the draw code. The laser is now quantized once
per frame, and the segment data is used for both collisions and
rendering. Player motion is now accounted for as well, preventing
phasing through thin lasers. The overall result is more precise *and*
faster collision detection.
2021-08-25 11:58:08 +03:00
Andrei Alexeyev
20b360fbd9
geometry: rework lineseg_circle_intersect; add a few useful functions
Fixed a false negative in lineseg_circle_intersect that could occur when
the closest point lies outside the line segment, yet the segment is
still within the circle's radius. Optimized to avoid square roots. Added
functions for querying the closest point on a line segment without
distance restrictions.
2021-08-23 03:46:52 +03:00
Andrei Alexeyev
593f756a70
renderer/null: return a more sensible fake viewport value
Avoids an assertion failure in r_framebuffer_viewport_rect
2021-08-22 03:07:42 +03:00
Andrei Alexeyev
9f2a3633ad
stage: fix --frameskip 2021-08-22 03:03:55 +03:00
Andrei Alexeyev
4d1b4eb72a
lasers: new renderer based on signed distance fields (#317)
* lasers: new SDF-based renderer (WIP)

* lasers: tweak sdf_apply shader

* lasers: fix incorrect rendering at 'unlucky' resolutions

* lasers: optimize rendering of multiple lasers

Try to coalesce render passes as much as possible

* lasers: fix warning

* lasers: move rendering into a new file

* lasers: correct "time" coordinate mapping for texturing

* lasers: wrote a novel about laser rendering [skip ci]

* lasers: fux tpyo

* remove references to old laser shape shaders

* lasers: fix some rendering edge cases
2021-08-22 01:27:12 +03:00
Alice D
cbe07e53df
story: fix some typos and awkward wording (#316) 2021-08-13 20:21:13 +03:00
Andrei Alexeyev
defb32fb74
renderer: add function to retrieve the default quad model 2021-08-11 14:06:41 +03:00
Andrei Alexeyev
ebfb845863
color: add alternative data accessors for convenience 2021-08-11 14:06:39 +03:00
Andrei Alexeyev
8d0a7682af
update koishi 2021-08-11 14:04:44 +03:00
Alice D
c6a6bda159
build,ci: turn on precompiled headers for emscripten (#315) 2021-08-06 01:59:55 +03:00
Andrei Alexeyev
c3538181ed
boss: add boss_add_attack_task_with_args() 2021-07-25 14:38:15 +03:00
Andrei Alexeyev
61d2d18731
gl33: only regen auto mipmaps if texture is to be used in the next draw 2021-07-20 14:16:15 +03:00
Andrei Alexeyev
7e58ebe8b9
gl33: fix linear-to-nearest filter remapping for unfilterable textures 2021-07-19 15:10:35 +03:00
Andrei Alexeyev
9666bae1bc
Fix gcc11 warnings 2021-07-18 19:09:12 +03:00
Andrei Alexeyev
5b5767a67a
pixmap/png: shut up bogus GCC -Wclobber warning 2021-07-18 19:02:43 +03:00
Andrei Alexeyev
b4e07470d8
pixmap: refactor
* Split conversion-related code into a separate file.
* Renamed loaders to fileformat handlers.
* Added API for exporting into one of the supported file formats.
* Replaced serialization APIs with an "internal" fileformat capable of
  of storing any Pixmap. It is identical to the serialization format.
* Removed PNG writing code from video_screenshot_task, now using the new
  pixmap export API instead.
2021-07-18 18:27:38 +03:00
Andrei Alexeyev
1840c85273
stages: add empty templates for custom entity types 2021-07-18 17:52:45 +03:00
Andrei Alexeyev
edac2dfe57
camcontrol: fix -Wreturn-type 2021-07-18 11:19:17 +03:00
Andrei Alexeyev
16d00b5672
build: make -Wreturn-type an error 2021-07-18 11:18:34 +03:00
Andrei Alexeyev
d10c5d0e7e
renderer: fix gles30/webgl breakage 2021-07-18 11:16:16 +03:00
Andrei Alexeyev
a6bb29529b
stage3: delete redundant textures 2021-07-18 10:41:13 +03:00
Andrei Alexeyev
cbbaa3eb7f
renderer: Add API to dump texture data into a pixmap 2021-07-18 10:39:05 +03:00
Andrei Alexeyev
da5d45efc3
camcontrol: release mouse when window is not focused 2021-07-18 10:38:43 +03:00