Texture Projection

I’m having issues trying to produce a certain effect with Shader graphs. I basically want an image to be projected on to an object in a way it is seamlessly projected over the edge. Another way of putting it is having the object ‘be a window’ that has a texture behind it. I have a youtube video example in blender of what I want it to look like as well as my current progress visually of what is currently wrong in unity. I perhaps did not choose the best texture to display what my issue is so if you need me to change it to something easier to see I can. Also ignore the white triangles that appear on the faces in certain positions on the blender example. I’ve tried digging around a bit online and I can’t find too much on the specific effect I want.

you’ll either want to sample a cubemap, or use screen position uv’s to make it constant in size (though you’ll want to offset it based on view direction etc to prevent it from looking like a texture pasted to the screen)

i included a shader here on this forum post for a very similar purpose, not sure if it complies for urp and hdrp though
Question - Trying to Implement Multiple skyboxes in my Unity scene - Unity Forum

I have tried getting that code to work and it does seem to compile but whenever I create a Material with it to apply to the cube it doesn’t work.

I created a cube map and then right clicked the shader and pressed Material, I then put the cubemap on the material. I then tried to apply this material to the cube but it doesn’t let me and it lets me apply it to the skybox but it doesn’t change anything. I also tried forcing the shader on to an object by creating a material and changing the shader from hdrp lit to the shader while its applied to the cube and the cube just disappears. Am I doing something wrong?

I saw something in the original post about the cube being inverted and so I wonder if that has something to do with my issue.

i actually had the same issue of not being able to apply it, but if you drag it into the material slot of the meshrenderer it will work.

if you don’t want to have the faces inverted change CULL FRONT to CULL BACK

Alright i did some testing and it definitely does work with built in shaders and I did what you did and it works, just not in hdrp but regardless I don’t really care whether its in hdrp or not. How might I go about getting it to look like the blender example? What might that look like in code? Could the order I placed the nodes and what part of the nodes I used in blender help that?

i’ve been trying to come up with a way to do this, the closest i’ve gotten is using the technique from this video
Colgate Total Plaque - Gum - English (youtube.com)

there always seems to be seams, but if you were to use triplanar you could reduce this, or maybe if you had a texture that tiles in all four directions.

never thought i’d see the name parker fitzgerald here…

glad you found it useful.