Tweak lighting shaders, add commented versions without normal mapping
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -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);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ defaultLS =
|
||||
, _lsParam =
|
||||
LSParam
|
||||
{ _lsPos = V3 0 0 50
|
||||
, _lsRad = 450
|
||||
, _lsRad = 200
|
||||
, _lsCol = 0.6
|
||||
}
|
||||
, _lsDir = 0
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user