summaryrefslogtreecommitdiff
path: root/camera.c
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-10-01 20:21:13 +0000
committerrodri <rgl@antares-labs.eu>2024-10-01 20:21:13 +0000
commitb6a336aff26fbc94e7803719a8aeb8fa29eddb9b (patch)
treeee3049837fc0edf7e3d2133aa711457bbf9b8859 /camera.c
parent453d100ac7734cd64652aa4d3a0685e3494428f7 (diff)
downloadlibgraphics-b6a336aff26fbc94e7803719a8aeb8fa29eddb9b.tar.gz
libgraphics-b6a336aff26fbc94e7803719a8aeb8fa29eddb9b.tar.bz2
libgraphics-b6a336aff26fbc94e7803719a8aeb8fa29eddb9b.zip
implement a uniforms interface through Shadertab.
Diffstat (limited to 'camera.c')
-rw-r--r--camera.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/camera.c b/camera.c
index f89640f..607f033 100644
--- a/camera.c
+++ b/camera.c
@@ -16,7 +16,7 @@ skyboxvs(Shaderparams *sp)
{
Point3 p;
- addvattr(sp->v, "dir", VAPoint, &sp->v->p);
+ sp->setattr(sp, "dir", VAPoint, &sp->v->p);
/* only rotate along with the camera */
p = sp->v->p;
p.w = 0; p = world2vcs(sp->su->camera, p);
@@ -32,7 +32,7 @@ skyboxfs(Shaderparams *sp)
Vertexattr *va;
Color c;
- va = getvattr(sp->v, "dir");
+ va = sp->getattr(sp, "dir");
c = samplecubemap(sp->su->camera->scene->skybox, va->p, neartexsampler);
return c;
}