jes notes Index Gallery . Signed Distance Functions Shaft passers Snap issues

2025-03-20

Last modified: 2025-03-20 21:01:03

< 2025-03-19 2025-03-21 >

Secondary object

So the plan is to draw the secondary object by drawing a second fragment shader on top of the first.

I literally have no idea what I'm doing, just have to hope Claude can figure this out.

Whoa it is working!

That's the untransformed rounded box being drawn on top of the main scene. I'm ditching the applyToSecondary thing, I'll eventually just make translate/rotate a part of each node and then it will get applied automatically.

I think I want a bit more of an abstraction over shaders.

I want to be able to "compile a shader" and add it to the scene, and set uniforms or whatever, without the renderer having to really know anything about it.

So I want some sort of object that represents a "render layer", and the object contains a reference to the compiled shader or whatever, and also stores the values of the uniforms. And then you add that object to the renderer and it just draws it as another layer.

And each frame you can update the uniform values in the render layer object if you want, or leave them alone and they'll stay the same.

We'll use that to set the object colour initially, and then subsequently we'll be able to specify node parameters with uniforms.

< 2025-03-19 2025-03-21 >