add material sphere preview, add ssr, improve shadow

This commit is contained in:
2026-05-14 21:37:02 +08:00
parent d11f8bb0c9
commit f50824bdb1
30 changed files with 1277 additions and 356 deletions

View File

@ -49,6 +49,9 @@ uniform int u_TextureSamples;
uniform bool u_EnableBloom;
uniform float u_BloomThreshold;
uniform bool u_EnableSSR;
uniform sampler2D u_SSRTexture;
const float uFar = 1.0;
vec4 SampleTexture(sampler2D tex, vec2 texCoord)
@ -94,6 +97,12 @@ void main()
color += bloomColor;
}
if (u_EnableSSR)
{
vec4 ssrSample = texture(u_SSRTexture, v_TexCoord);
color += ssrSample.rgb * ssrSample.a;
}
float exposure = 1.0f;
if(u_EnableAutoExposure)