summaryrefslogtreecommitdiff
path: root/resources/shaders/shader.frag
diff options
context:
space:
mode:
authorSebastian Park <SebPark03@gmail.com>2024-05-10 04:46:56 -0400
committerSebastian Park <SebPark03@gmail.com>2024-05-10 04:46:56 -0400
commitbe4550c9e22aada0fcadbb57d3a0f03ac919c524 (patch)
treeec26ab39b8c832b18b782d92fa834469e3cac380 /resources/shaders/shader.frag
parentd158de5abe6ddbc8546a7fafd797e9f7c74fe768 (diff)
up resolution of skybox and add orange sun and better foam.
Diffstat (limited to 'resources/shaders/shader.frag')
-rwxr-xr-xresources/shaders/shader.frag3
1 files changed, 2 insertions, 1 deletions
diff --git a/resources/shaders/shader.frag b/resources/shaders/shader.frag
index ef4e9c7..e9e3210 100755
--- a/resources/shaders/shader.frag
+++ b/resources/shaders/shader.frag
@@ -25,6 +25,7 @@ uniform sampler2D groundSampler;
uniform sampler2D skySampler;
uniform vec2 widthBounds;
uniform vec2 lengthBounds;
+uniform vec4 sunColor = vec4(1, 0.5f, 0, 1.f);
//uniform float test = 0;
// Random methods from https://gist.github.com/patriciogonzalezvivo/670c22f3966e662d2f83
@@ -82,7 +83,7 @@ void main() {
// SOME OF IT WILL BE DIFFUSELY LIT, BUT THERE WILL BE SUBSURFACE SCATTERING, ESTIMATED BY THE AMBIENT TERM
vec4 diffuse = vec4(red * d, green * d, blue * d, 1.0f);
- vec4 specular = vec4(1, 1, 1, 1) * pow(spec, 10.f);
+ vec4 specular = sunColor * pow(spec, 10.f);
// vec4 transmissive = vec4(vec3(refrUV, 1.f - refrUV.y), 1.f);
float waterBlurriness = 0.f;
vec2 refrUVBlurry = (1 - beerAtt) * vec2(rand(refrUV), rand(vec4(pos, d))) * waterBlurriness + refrUV;