diff options
author | Geenz <geenz@geenzo.com> | 2019-04-10 02:11:07 -0700 |
---|---|---|
committer | Geenz <geenz@geenzo.com> | 2019-04-10 02:11:07 -0700 |
commit | 08812cbe060e62cb8b61e91bc2f878a74a0015e5 (patch) | |
tree | 50e6cd88845b96a7b457bc3f81c56f4d17a114b8 /indra/newview/app_settings/shaders/class1 | |
parent | dcd8117b85f45886f78a1a2e9756cb1709d6572a (diff) |
Separate out vertex program objects from fragment program objects and use it.
Given that mShaderObjects only ever expects one copy of a given shader object (leading to lots of "shaderV" and "shaderF"), it made having utility shaders a bit more difficult to incorporate.
This change makes sure the two are separated. Using this over a multimap largely for readibility.
Also, actually, you know, use this functionality.
--HG--
branch : OPEN-340
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl | 6 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl index 4b9e8290dd..c599c14b43 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl @@ -73,6 +73,8 @@ vec3 fullbrightAtmosTransportFrag(vec3 l, vec3 additive, vec3 atten); void calcFragAtmospherics(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten); +void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten); + vec3 scaleSoftClipFrag(vec3 l); vec4 getPositionWithDepth(vec2 pos_screen, float depth); @@ -107,8 +109,8 @@ void main() vec3 additive; vec3 atten; - calcFragAtmospherics(pos.xyz, 1.0, sunlit, amblit, additive, atten); - + calcAtmosphericVars(pos.xyz, 1.0, sunlit, amblit, additive, atten); + sunlit *= 0.5; float ambient = da; ambient *= 0.5; ambient *= ambient; diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl index 2854fb8139..a099083883 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl @@ -77,7 +77,7 @@ void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, o temp2.x = dot(Pn, tmpLightnorm.xyz);
temp2.x = 1. - temp2.x;
//temp2.x is 0 at the sun and increases away from sun
- temp2.x = max(temp2.x, .03); //was glow.y
+ temp2.x = max(temp2.x, .001); //was glow.y
//set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
temp2.x *= glow.x;
//higher glow.x gives dimmer glow (because next step is 1 / "angle")
@@ -109,8 +109,8 @@ void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, o + tmpAmbient));
//brightness of surface both sunlight and ambient
- sunlit = vec3(sunlight.rgb);
- amblit = vec3(tmpAmbient * .25);
+ sunlit = sunlight.rgb;
+ amblit = tmpAmbient.rgb * .25;
additive = normalize(additive);
additive *= vec3(1.0 - exp(-temp2.z * distance_multiplier)) * 0.5;
}
\ No newline at end of file |