- Home /
What is the most performance efficient way of changing the color of individual pixels entirely through code?
I want to make an entirely pixel-filled 2d game where each pixel color is selected through code with no 3d objects. What would be the most performance efficient way to approach this if I want to change the color of a large number of pixels every frame?
Think along the lines of Conway's Game of Life - that simple.
There is a shader that allows swapping each color of a material's texture. That would probably be the most efficient approach by far.
Hi @Cherno are you referring to a compute shader?
I guess not using Unity and looking for a different engine would be. Unity is a 3D Engine and a 2D engine is probably way better at that.
Answer by NoMoneys · Mar 25, 2018 at 07:46 PM
You should use shaders for this: https://docs.unity3d.com/Manual/SL-VertexFragmentShaderExamples.html
Your answer
Follow this Question
Related Questions
Sprite not visible from behind 0 Answers
My camera not rendering anything in Custom render type,I have an issue: 0 Answers
How do I make one light source override all other light sources? 0 Answers
How to Display Hundreds of Thousands of Sprites? 2 Answers
Mesh with vertices changed in script is not rendered 1 Answer