mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 08:42:50 +08:00
INTERNAL REWORK. testers are needed.
This commit is contained in:
40
shaders/dimensions/deferred2.vsh
Normal file
40
shaders/dimensions/deferred2.vsh
Normal file
@ -0,0 +1,40 @@
|
||||
|
||||
//#extension GL_EXT_gpu_shader4 : disable
|
||||
#include "/lib/settings.glsl"
|
||||
|
||||
flat varying vec3 averageSkyCol;
|
||||
flat varying vec3 sunColor;
|
||||
flat varying vec3 moonColor;
|
||||
|
||||
|
||||
flat varying float tempOffsets;
|
||||
flat varying vec3 WsunVec;
|
||||
uniform mat4 gbufferModelViewInverse;
|
||||
uniform vec3 sunPosition;
|
||||
uniform float sunElevation;
|
||||
|
||||
uniform sampler2D colortex4;
|
||||
uniform int frameCounter;
|
||||
|
||||
#include "/lib/util.glsl"
|
||||
#include "/lib/res_params.glsl"
|
||||
|
||||
#include "/lib/Shadow_Params.glsl"
|
||||
|
||||
void main() {
|
||||
|
||||
gl_Position = ftransform();
|
||||
gl_Position.xy = (gl_Position.xy*0.5+0.5)*clamp(CLOUDS_QUALITY+0.01,0.0,1.0)*2.0-1.0;
|
||||
|
||||
averageSkyCol = texelFetch2D(colortex4,ivec2(1,37),0).rgb;
|
||||
sunColor = texelFetch2D(colortex4,ivec2(6,37),0).rgb;
|
||||
moonColor = texelFetch2D(colortex4,ivec2(13,37),0).rgb;
|
||||
|
||||
WsunVec = ( float(sunElevation > 1e-5)*2-1. )*normalize(mat3(gbufferModelViewInverse) *sunPosition);
|
||||
// WsunVec = normalize(LightDir);
|
||||
|
||||
tempOffsets = HaltonSeq2(frameCounter%10000);
|
||||
#ifdef TAA_UPSCALING
|
||||
gl_Position.xy = (gl_Position.xy*0.5+0.5)*RENDER_SCALE*2.0-1.0;
|
||||
#endif
|
||||
}
|
Reference in New Issue
Block a user