summaryrefslogtreecommitdiff
path: root/solar.c
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-06-13 19:12:59 +0000
committerrodri <rgl@antares-labs.eu>2024-06-13 19:12:59 +0000
commitd5efccfa229a5bc62c8065c0e66ce09f591d9afa (patch)
tree9fc7ebc310dddda63fd531833c62d82a63c81afa /solar.c
parent7667c666663dbe35c8dcb783670e3c083c5c4ce8 (diff)
download3dee-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.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/solar.c b/solar.c
index 4caf284..5fa5497 100644
--- a/solar.c
+++ b/solar.c
@@ -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 };