- Home /
How to use mesh data in shader
Hello,
I've been working on a 2d light-shadow system. My plan was to;
Create a mesh of lit spaces inside the screen.
Use that mesh as a guide to create shadows and light with custom shaders.
The first part was not that hard;
I've created the mesh, but i have almost 0 experience in writing shaders. I've been editing already written shaders and i thought it would be easy to do this but after two days of researching / studying shaders, i still don't even know if I can use the mesh data as an input in my shader. I don't know which kind of shader i should use.
I would appreciate if someone tells me if mesh data can or cannot be used as input of a shader, and how to do it if it can be done.
Thank you
This link might help to get you further towards what you want. I think the additionalVertexStreams could be a solution, but it's not documented how a shader accesses them...
Your answer
Follow this Question
Related Questions
Outline flat mesh 1 Answer
Mesh shader to outline colour changes 1 Answer
Nicely fade transparency with standard shader? 2 Answers
Hiding parts of mesh but only on defined objects 0 Answers
Create a hole in a mesh using a shader 0 Answers