mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-23 17:12:40 +08:00
intial changes for commit #495
This commit is contained in:
@ -25,10 +25,11 @@ flat varying float exposure;
|
||||
flat varying vec4 lightCol;
|
||||
flat varying vec3 WsunVec;
|
||||
|
||||
#if defined Daily_Weather
|
||||
#ifdef Daily_Weather
|
||||
flat varying vec4 dailyWeatherParams0;
|
||||
flat varying vec4 dailyWeatherParams1;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
varying vec4 normalMat;
|
||||
@ -132,6 +133,15 @@ void main() {
|
||||
position = mat3(gbufferModelView) * (displacedPos - cameraPosition) + gbufferModelView[3].xyz;
|
||||
}
|
||||
#endif
|
||||
|
||||
// vec3 position = mat3(gl_ModelViewMatrix) * vec3(gl_Vertex) + gl_ModelViewMatrix[3].xyz;
|
||||
vec3 worldpos = mat3(gbufferModelViewInverse) * position + gbufferModelViewInverse[3].xyz;
|
||||
#ifdef PLANET_CURVATURE
|
||||
float curvature = length(worldpos) / (16*8);
|
||||
worldpos.y -= curvature*curvature * CURVATURE_AMOUNT;
|
||||
#endif
|
||||
position = mat3(gbufferModelView) * worldpos + gbufferModelView[3].xyz;
|
||||
|
||||
gl_Position = toClipSpace3(position);
|
||||
|
||||
HELD_ITEM_BRIGHTNESS = 0.0;
|
||||
@ -149,7 +159,6 @@ void main() {
|
||||
// water mask
|
||||
if(mc_Entity.x == 8.0) {
|
||||
mat = 1.0;
|
||||
gl_Position.z -= 1e-4;
|
||||
}
|
||||
|
||||
// translucent entities
|
||||
@ -193,8 +202,8 @@ void main() {
|
||||
// WsunVec = normalize(LightDir);
|
||||
|
||||
#if defined Daily_Weather
|
||||
dailyWeatherParams0 = vec4((texelFetch2D(colortex4,ivec2(1,1),0).rgb/150.0)/2.0, 0.0);
|
||||
dailyWeatherParams1 = vec4((texelFetch2D(colortex4,ivec2(2,1),0).rgb/150.0)/2.0, 0.0);
|
||||
dailyWeatherParams0 = vec4(texelFetch2D(colortex4,ivec2(1,1),0).rgb / 1500.0, 0.0);
|
||||
dailyWeatherParams1 = vec4(texelFetch2D(colortex4,ivec2(2,1),0).rgb / 1500.0, 0.0);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user