- Home /
Are shaders more efficient than manual pixel replacement?
I am building a real time strategy game where each unit is a sprite. Some pixels of the sprite can have their colors changed. Whether a pixel can be color changed depends on the hue of the pixel (in hsv). I have written a script that manually replaces the pixels within the sprite texture. When there are many units in the game, the performance slows down.
Would it be more efficient to use a shader instead? What makes a shader more efficient? Thanks in advance.
Your answer
Follow this Question
Related Questions
Shader on 3D model not seen over 2D sprites 0 Answers
Allow 2D sprite to receive light from any direction and show on both sides 0 Answers
Shaders - offset texture coordinates by a single pixel 2 Answers
Skew a sprite at runtime while preserving the pixel shape? 1 Answer
Grass shader sprite 2D 3 Answers