SomeRandomGameDev / DumbFramework

A very dumb framework/glue to small useful libraries for quick and dirty prototyping.
0 stars 0 forks source link

[Sprengine] Minor optimisations, stuffs to test. #49

Open BlockoS opened 9 years ago

BlockoS commented 9 years ago

In sprengine.cpp in the default vertex shader "s_dse_vertexShaderInstanced":

const vec2 quad[4] = { vec2(0, 0), vec2(0, 1), vec2(1, 0), vec2(1, 1) };
// [...]
vec2 point = quad[gl_VertexID];

may be replaced by;

vec2 point = vec2(gl_VertexID >> 1, gl_VertexID & 1);