20 Commits

Author SHA1 Message Date
Yi Shen
8826c7f4cb
Add emissive material support in deferred renderer (#141)
* wip: emissive material support in deferred renderer

* fix
2024-01-01 09:55:12 +08:00
Yi Shen
9767eb5c72
Add rect area light in the examples. Other improvements (#138)
* wip: add rect area light in example

* fix normal not normalized

* update example

* fix light accumulation for custom light in deferred renderer

* fix alpha is larger than 1 in the light accumulation

* naming tweaks

* updateOffset in deferred renderer

* convert albedo color to sRGB in gbuffer

* support depth attachment in gbuffer

* fix some shadow map issue in deferred renderer

* clear depth buffer after render

* update pcf kernel in shadow

* fix light accumulate

* fix pcf shadow in deferred renderer

* deferred: fix pcss

* respect to material linear

* can disable camera bounding box intersection in shadowmap

* deferred: show black when there is no light

* resize support pixelRatio

* release alpha.18
2023-03-11 10:06:45 +08:00
pissang
98d96d9d53 rename devicePixelRatio to pixelRatio. fix type errors 2023-02-19 15:38:25 +08:00
pissang
7bb94bc352 fix: composite node add depthBuffer flag 2023-02-18 18:58:31 +08:00
Yi Shen
0030d7db95
Switch to WebGL 2.0 (#136)
* wip: upgrade to webgl2

* update shaders to version 300

* fix index for texture must be constant in webgl 2

* remove npot

* fix naming conflicts of using texture previously

* fix wrong internal format in float textures.

* fix depth texture format

* fix texture enabled define

* fix instancing

* fix some cases

* fix some case use extension

* fix frag depth

* tweak

* generate mimap for NPOT texture

* remove debugger code

* fix alchemyao case

* fix ssr case

* not generate mipmap in compositor by default.
2023-02-15 22:09:08 +08:00
pissang
1ee8db7dcf refact(viewport): optimize viewport management. get dpr correctly in framebuffer 2022-06-05 18:39:25 +08:00
pissang
77a8761695 example: add lighting compositor 2022-06-04 21:54:37 +08:00
pissang
f7d4f65276 refact: fix cascade shadow casued by the refactord framebuffer binding 2022-06-03 16:03:03 +08:00
pissang
aeab338ecc example: optimize taa 2022-06-03 13:51:29 +08:00
pissang
2063c7b189 example: fix texel size in TAA 2022-05-30 17:37:32 +08:00
pissang
37d44a3399 example: add taa 2022-05-28 16:07:02 +08:00
pissang
502240a008 refact: all nodes default to have outputs. Avoid writing too much boilerplate code 2022-05-25 16:17:56 +08:00
pissang
46a8212824 example: update alchemyao example 2022-05-24 17:10:59 +08:00
pissang
c55f21ff17 refact(composite): split updateLinks logc from prepare method in group node.
Leave prepare to developers. Avoid forgetting to call super.prepare leads to unexpected error that is hard to debug
2022-05-24 17:02:13 +08:00
pissang
a3a24bc5c8 refact(composite): fix output scale param. add bloom node in example 2022-05-23 23:45:28 +08:00
pissang
529df38a2e refact: updating textureSize automatically 2022-05-23 17:57:19 +08:00
pissang
4d3976c8ff refact(composite): input of group node can be linked to multiple inner node.
add SSR example
2022-05-22 22:04:26 +08:00
pissang
5cf76d9808 refact(composite): add getGroupInput, getGroupOutput to link the sub node 2022-05-22 17:02:50 +08:00
pissang
c3f1a34969 refact(composite): default width and height from renderer.
Update all output parameters. for the case like gbuffer node
2022-05-21 14:59:13 +08:00
pissang
1dcbe540d5 refact(composite): derive output texture params. add gaussian blur group node example 2022-05-20 14:47:53 +08:00