diff options
author | rodri <rgl@antares-labs.eu> | 2024-06-13 19:12:59 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-06-13 19:12:59 +0000 |
commit | d5efccfa229a5bc62c8065c0e66ce09f591d9afa (patch) | |
tree | 9fc7ebc310dddda63fd531833c62d82a63c81afa /solar.c | |
parent | 7667c666663dbe35c8dcb783670e3c083c5c4ce8 (diff) | |
download | 3dee-d5efccfa229a5bc62c8065c0e66ce09f591d9afa.tar.gz 3dee-d5efccfa229a5bc62c8065c0e66ce09f591d9afa.tar.bz2 3dee-d5efccfa229a5bc62c8065c0e66ce09f591d9afa.zip |
use the new modulapt3 functions. don't clamp in the shaders.
Diffstat (limited to 'solar.c')
-rw-r--r-- | solar.c | 16 |
1 files changed, 3 insertions, 13 deletions
@@ -151,7 +151,7 @@ Camcfg cameracfg = { 0,0,0,1, 0,0,0,1, 0,1,0,0, - 80*DEG, 0.01, 1e12, PERSPECTIVE + 80*DEG, 1, 1e12, PERSPECTIVE }; Point3 center = {0,0,0,1}; double speed = 10; @@ -349,19 +349,9 @@ identvshader(VSparams *sp) Color identshader(FSparams *sp) { - Color tc, c; - if(sp->v.mtl != nil && sp->v.mtl->diffusemap != nil && sp->v.uv.w != 0) - tc = texture(sp->v.mtl->diffusemap, sp->v.uv, neartexsampler); - else - tc = sp->v.c; - - c.a = 1; - c.b = fclamp(tc.b, 0, 1); - c.g = fclamp(tc.g, 0, 1); - c.r = fclamp(tc.r, 0, 1); - - return c; + return texture(sp->v.mtl->diffusemap, sp->v.uv, neartexsampler); + return sp->v.c; } Shadertab shader = { "ident", identvshader, identshader }; |