|
@@ -18,7 +18,7 @@ layout(TEX_BINDING(1, 0)) uniform sampler2D anki_msDepthRt;
|
|
|
#undef LIGHT_SS_BINDING
|
|
#undef LIGHT_SS_BINDING
|
|
|
#undef LIGHT_TEX_BINDING
|
|
#undef LIGHT_TEX_BINDING
|
|
|
|
|
|
|
|
-#define anki_u_time u_lightingUniforms.groundLightDirTime.w
|
|
|
|
|
|
|
+#define anki_u_time u_lightingUniforms.rendererSizeTimePad1.z
|
|
|
|
|
|
|
|
layout(location = 0) in vec3 in_vertPosViewSpace;
|
|
layout(location = 0) in vec3 in_vertPosViewSpace;
|
|
|
layout(location = 1) flat in float in_alpha;
|
|
layout(location = 1) flat in float in_alpha;
|
|
@@ -69,9 +69,9 @@ void particleAlpha(in sampler2D tex, in float alpha)
|
|
|
void particleSoftTextureAlpha(in sampler2D depthMap, in sampler2D tex,
|
|
void particleSoftTextureAlpha(in sampler2D depthMap, in sampler2D tex,
|
|
|
in float alpha)
|
|
in float alpha)
|
|
|
{
|
|
{
|
|
|
- const vec2 screenSize = vec2(
|
|
|
|
|
- 1.0 / float(ANKI_RENDERER_WIDTH),
|
|
|
|
|
- 1.0 / float(ANKI_RENDERER_HEIGHT));
|
|
|
|
|
|
|
+ vec2 screenSize = vec2(
|
|
|
|
|
+ 1.0 / u_lightingUniforms.rendererSizeTimePad1.x,
|
|
|
|
|
+ 1.0 / u_lightingUniforms.rendererSizeTimePad1.y);
|
|
|
|
|
|
|
|
float depth = texture(depthMap, gl_FragCoord.xy * screenSize).r;
|
|
float depth = texture(depthMap, gl_FragCoord.xy * screenSize).r;
|
|
|
|
|
|
|
@@ -104,9 +104,9 @@ void particleTextureAlpha(in sampler2D tex, in float alpha)
|
|
|
void particleSoftColorAlpha(in sampler2D depthMap, in vec3 icolor,
|
|
void particleSoftColorAlpha(in sampler2D depthMap, in vec3 icolor,
|
|
|
in float alpha)
|
|
in float alpha)
|
|
|
{
|
|
{
|
|
|
- const vec2 screenSize = vec2(
|
|
|
|
|
- 1.0 / float(ANKI_RENDERER_WIDTH),
|
|
|
|
|
- 1.0 / float(ANKI_RENDERER_HEIGHT));
|
|
|
|
|
|
|
+ vec2 screenSize = vec2(
|
|
|
|
|
+ 1.0 / u_lightingUniforms.rendererSizeTimePad1.x,
|
|
|
|
|
+ 1.0 / u_lightingUniforms.rendererSizeTimePad1.y);
|
|
|
|
|
|
|
|
float depth = texture(depthMap, gl_FragCoord.xy * screenSize).r;
|
|
float depth = texture(depthMap, gl_FragCoord.xy * screenSize).r;
|
|
|
|
|
|
|
@@ -137,9 +137,9 @@ vec3 computeLightColor(vec3 diffCol)
|
|
|
fragPos.z = u_lightingUniforms.projectionParams.z
|
|
fragPos.z = u_lightingUniforms.projectionParams.z
|
|
|
/ (u_lightingUniforms.projectionParams.w + depth);
|
|
/ (u_lightingUniforms.projectionParams.w + depth);
|
|
|
|
|
|
|
|
- const vec2 screenSize = vec2(
|
|
|
|
|
- 1.0 / float(ANKI_RENDERER_WIDTH),
|
|
|
|
|
- 1.0 / float(ANKI_RENDERER_HEIGHT));
|
|
|
|
|
|
|
+ vec2 screenSize = vec2(
|
|
|
|
|
+ 1.0 / u_lightingUniforms.rendererSizeTimePad1.x,
|
|
|
|
|
+ 1.0 / u_lightingUniforms.rendererSizeTimePad1.y);
|
|
|
|
|
|
|
|
vec2 ndc = gl_FragCoord.xy * screenSize * 2.0 - 1.0;
|
|
vec2 ndc = gl_FragCoord.xy * screenSize * 2.0 - 1.0;
|
|
|
|
|
|
|
@@ -267,8 +267,8 @@ void particleAnimatedTextureAlphaLight(sampler2DArray tex, float alpha,
|
|
|
void fog(in sampler2D depthMap, in vec3 color, in float fogScale)
|
|
void fog(in sampler2D depthMap, in vec3 color, in float fogScale)
|
|
|
{
|
|
{
|
|
|
const vec2 screenSize = vec2(
|
|
const vec2 screenSize = vec2(
|
|
|
- 1.0 / float(ANKI_RENDERER_WIDTH),
|
|
|
|
|
- 1.0 / float(ANKI_RENDERER_HEIGHT));
|
|
|
|
|
|
|
+ 1.0 / u_lightingUniforms.rendererSizeTimePad1.x,
|
|
|
|
|
+ 1.0 / u_lightingUniforms.rendererSizeTimePad1.y);
|
|
|
|
|
|
|
|
vec2 texCoords = gl_FragCoord.xy * screenSize;
|
|
vec2 texCoords = gl_FragCoord.xy * screenSize;
|
|
|
float depth = texture(depthMap, texCoords).r;
|
|
float depth = texture(depthMap, texCoords).r;
|