mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-27 02:32:39 +08:00
Clean specular.glsl and make it easier to use for myself across dimension. make grass brighter in ambient light.
This commit is contained in:
@ -84,6 +84,8 @@ vec2 RENDER_SCALE = vec2(1.0);
|
||||
|
||||
#include "/lib/end_fog.glsl"
|
||||
|
||||
#undef LIGHTSOURCE_REFLECTION
|
||||
#define ENDSPECULAR
|
||||
#include "/lib/specular.glsl"
|
||||
|
||||
|
||||
@ -453,8 +455,13 @@ void main() {
|
||||
// finalize
|
||||
gl_FragData[0].rgb = (Indirect_lighting + LightSource) * albedo;
|
||||
|
||||
// #ifdef Specular_Reflections
|
||||
// MaterialReflections_E(gl_FragData[0].rgb, SpecularTex.r, SpecularTex.ggg, albedo, normal, np3, fragpos, vec3(blueNoise(gl_FragCoord.xy).rg,noise), hand, LightColor * LightFalloff, normalize(-LightPos), entities);
|
||||
// #endif
|
||||
|
||||
#ifdef Specular_Reflections
|
||||
MaterialReflections_E(gl_FragData[0].rgb, SpecularTex.r, SpecularTex.ggg, albedo, normal, np3, fragpos, vec3(blueNoise(gl_FragCoord.xy).rg,noise), hand, LightColor * LightFalloff, normalize(-LightPos), entities);
|
||||
vec3 specNoise = vec3(blueNoise(gl_FragCoord.xy).rg, interleaved_gradientNoise());
|
||||
DoSpecularReflections(gl_FragData[0].rgb, fragpos, np3, vec3(0.0), specNoise, normal, SpecularTex.r, SpecularTex.g, albedo, vec3(0.0), 1.0, hand);
|
||||
#endif
|
||||
|
||||
if(!hand) gl_FragData[0].rgb *= ssao(fragpos,noise,FlatNormals) * AO;
|
||||
|
@ -12,6 +12,7 @@ uniform sampler2D depthtex1;
|
||||
uniform sampler2D colortex13;
|
||||
uniform sampler2D colortex11;
|
||||
uniform sampler2D colortex7;
|
||||
uniform sampler2D colortex4;
|
||||
uniform sampler2D colortex3;
|
||||
uniform sampler2D colortex2;
|
||||
uniform sampler2D colortex0;
|
||||
@ -183,5 +184,16 @@ void main() {
|
||||
}
|
||||
|
||||
gl_FragData[0].r = bloomyfogmult;
|
||||
|
||||
|
||||
|
||||
#ifdef display_LUT
|
||||
vec2 movedTC = texcoord;
|
||||
vec3 thingy = texture2D(colortex4,movedTC).rgb / 30.0;
|
||||
if(luma(thingy) > 0.0 ) color.rgb = thingy;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
gl_FragData[1].rgb = clamp(color,6.11*1e-5,65000.0);
|
||||
}
|
||||
|
@ -83,11 +83,12 @@ if (gl_FragCoord.x > 18.+257. && gl_FragCoord.y > 1. && gl_FragCoord.x < 18+257+
|
||||
vec2 p = clamp(floor(gl_FragCoord.xy-vec2(18.+257,1.))/256.+tempOffsets/256.,0.0,1.0);
|
||||
vec3 viewVector = cartToSphere(p);
|
||||
|
||||
mat2x3 vL = getVolumetricRays(fract(frameCounter/1.6180339887),mat3(gbufferModelView)*viewVector*1024.,fract(frameCounter/2.6180339887));
|
||||
float absorbance = dot(vL[1],vec3(0.22,0.71,0.07));
|
||||
mat2x3 vl = getVolumetricRays(fract(frameCounter/1.6180339887),mat3(gbufferModelView)*viewVector*1024.,fract(frameCounter/2.6180339887));
|
||||
|
||||
float absorbance = dot(vl[1],vec3(0.22,0.71,0.07));
|
||||
|
||||
gl_FragData[0] = clamp(vec4(vl[0]*0.7,absorbance),0.000001,65000.);
|
||||
|
||||
gl_FragData[0] = vec4(vL[0].rgb * (1.0-absorbance),1.0);
|
||||
}
|
||||
|
||||
//Temporally accumulate sky and light values
|
||||
|
Reference in New Issue
Block a user