Yo all,
Some will call it decal system , some will call it projection.
I’m doing everything in unity and with code.
I have a csharp code that can in realime give me a matrix of 4 positions and matrix of four colors. The shader so far works, I draw 4 circles in different colors when ray casts hit the geometry.
Next step is to use those colors as a tint for a texture. (BUT!) here is my problem. I want to project uv TEXCOORD0 inside uv2 TEXCOORD1; that Said i want to rescale the texture I project on the default geometry uv. I know I need to use the remapping mathematical formula, but I’m not sure if that uv calculation needs to be on the M_Matrix. I need a kickstarter from someone how to approach it.
^^ thanks!
I use unlit CG Shader.