mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 00:37:35 +08:00
WIP nether shader
This commit is contained in:
@ -4,20 +4,10 @@
|
||||
|
||||
#include "/lib/settings.glsl"
|
||||
|
||||
flat varying vec4 lightCol;
|
||||
// flat varying vec3 ambientUp;
|
||||
// flat varying vec3 ambientLeft;
|
||||
// flat varying vec3 ambientRight;
|
||||
// flat varying vec3 ambientB;
|
||||
// flat varying vec3 ambientF;
|
||||
// flat varying vec3 ambientDown;
|
||||
flat varying float tempOffsets;
|
||||
flat varying float fogAmount;
|
||||
flat varying float VFAmount;
|
||||
uniform sampler2D noisetex;
|
||||
uniform sampler2D depthtex0;
|
||||
|
||||
|
||||
uniform sampler2D colortex2;
|
||||
uniform sampler2D colortex3;
|
||||
// uniform sampler2D colortex4;
|
||||
@ -32,10 +22,14 @@ uniform float frameTimeCounter;
|
||||
uniform int isEyeInWater;
|
||||
uniform vec2 texelSize;
|
||||
|
||||
uniform vec3 previousCameraPosition;
|
||||
varying vec2 texcoord;
|
||||
|
||||
#include "/lib/color_transforms.glsl"
|
||||
#include "/lib/color_dither.glsl"
|
||||
#include "/lib/projections.glsl"
|
||||
|
||||
|
||||
#include "/lib/nether_fog.glsl"
|
||||
|
||||
|
||||
@ -54,24 +48,20 @@ float blueNoise(){
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
|
||||
varying vec2 texcoord;
|
||||
|
||||
|
||||
|
||||
void main() {
|
||||
/* DRAWBUFFERS:0 */
|
||||
|
||||
// if (isEyeInWater == 0){
|
||||
// vec2 tc = floor(gl_FragCoord.xy)*2.0*texelSize+0.5*texelSize;
|
||||
// float z = texture2D(depthtex0,tc).x;
|
||||
// vec3 fragpos = toScreenSpace(vec3(tc,z));
|
||||
vec2 tc = floor(gl_FragCoord.xy)*2.0*texelSize+0.5*texelSize;
|
||||
float z = texture2D(depthtex0,tc).x;
|
||||
vec3 fragpos = toScreenSpace(vec3(tc,z));
|
||||
|
||||
// vec3 fragpos_ALT = toScreenSpace(vec3(texcoord-vec2(0.0)*texelSize*0.5,z));
|
||||
vec4 VolumetricFog = GetVolumetricFog(fragpos, blueNoise());
|
||||
|
||||
// float noise = blueNoise();
|
||||
// mat2x3 vl = getVolumetricRays(noise,fragpos, interleaved_gradientNoise());
|
||||
|
||||
// float absorbance = dot(vl[1],vec3(0.22,0.71,0.07));
|
||||
|
||||
// gl_FragData[0] = clamp(vec4(vl[0],absorbance),0.000001,65000.);
|
||||
gl_FragData[0] = clamp(VolumetricFog, 0.0, 65000.0);
|
||||
|
||||
// } else {
|
||||
// gl_FragData[0] = vec4(0.0);
|
||||
|
Reference in New Issue
Block a user