36 lines
809 B
GLSL
36 lines
809 B
GLSL
#version 120
|
|
/*
|
|
Sildur's Enhanced Default:
|
|
https://www.patreon.com/Sildur
|
|
https://sildurs-shaders.github.io/
|
|
https://twitter.com/Sildurs_shaders
|
|
https://www.curseforge.com/minecraft/customization/sildurs-enhanced-default
|
|
|
|
Permissions:
|
|
You are not allowed to edit, copy code or share my shaderpack under a different name or claim it as yours.
|
|
*/
|
|
|
|
#define composite0
|
|
#include "shaders.settings"
|
|
|
|
varying vec2 texcoord;
|
|
varying vec4 color;
|
|
#ifdef Godrays
|
|
varying vec2 lightPos;
|
|
#endif
|
|
uniform vec3 sunPosition;
|
|
uniform mat4 gbufferProjection;
|
|
|
|
void main() {
|
|
gl_Position = ftransform();
|
|
texcoord = (gl_MultiTexCoord0).xy;
|
|
#ifdef Godrays
|
|
vec4 tpos = vec4(sunPosition,1.0)*gbufferProjection;
|
|
tpos = vec4(tpos.xyz/tpos.w,1.0);
|
|
vec2 pos1 = tpos.xy/tpos.z;
|
|
lightPos = pos1*0.5+0.5;
|
|
#endif
|
|
|
|
color = gl_Color;
|
|
}
|