Tweak lighting shaders, add commented versions without normal mapping

This commit is contained in:
2024-06-20 16:33:23 +01:00
parent 935f09f08e
commit 7162893c4f
6 changed files with 13 additions and 7 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+7 -2
View File
@@ -22,7 +22,12 @@ void main() {
//float y3 = clamp(0.5 * (y1 + 2),0,1) ;
//float y = float(normbit.w == 0 ? y3 : y2);
float y = y2;
float x = 1 - dist / rad;
vec3 c = y* (x * x * x) * lumRad.rgb;
//float x = 1 - dist / rad;
float x = 1 - (pow(dist / rad,4));
//float x = 1;
//float x = 1 - max(0, ((dist + 10000) - rad) * 0.0001) ;
//vec3 c = y* (x * x * x) * lumRad.rgb;
vec3 c = y* x * lumRad.rgb;
//vec3 c = x * lumRad.rgb;
fColor = vec4(c, 0);
}
+1 -1
View File
@@ -10,7 +10,7 @@ defaultLS =
, _lsParam =
LSParam
{ _lsPos = V3 0 0 50
, _lsRad = 450
, _lsRad = 200
, _lsCol = 0.6
}
, _lsDir = 0
+1 -1
View File
@@ -130,7 +130,7 @@ youLight :: TempLightSource
youLight = TLS
{ _tlsParam = LSParam
{_lsPos = V3 0 0 0
,_lsRad = 300
,_lsRad = 150
,_lsCol = 0.1
}
,_tlsUpdate = \w _ -> Just (youLight & tlsParam . lsPos .~ f (_crPos $ you w))
+2 -2
View File
@@ -78,7 +78,7 @@ putLitButOnPos col theps subpl =
.~ _plSpot plmnt
where
changeLight lsid = SetLSCol (V3 0 0.5 0) lsid
ls = lsRadCol 75 (V3 0.5 0 0)
ls = lsRadCol 50 (V3 0.5 0 0)
-- creates a lit external trigger, passes the trigger placement forward
extTrigLitPos :: PlacementSpot -> (Placement -> Maybe Placement) -> Placement
@@ -128,4 +128,4 @@ putLitButOnPosExtTrig' col thePS cnt =
trigid tp = fromJust $ _plMID tp
oneff tid = SetTrigger True tid
changeLight = SetLSCol (V3 0 0.5 0)
ls = lsRadCol 75 (V3 0.5 0 0)
ls = lsRadCol 50 (V3 0.5 0 0)
+1
View File
@@ -20,6 +20,7 @@
#resolver: lts-17.1
#resolver: lts-18.28
resolver: lts-19.20
#resolver: lts-22.25
#resolver: lts-19.3
# User packages to be built.