Performance optimization.
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Has been cancelled
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Has been cancelled
This commit is contained in:
@@ -72,15 +72,6 @@ vec4 DefaultInstanced() {
|
||||
return gl_ModelViewProjectionMatrix * vec4(world_pos, 0.0, 1.0);
|
||||
}
|
||||
|
||||
vec4 FillRectInstanced() {
|
||||
vec2 instance_pos = a_instance_position + vec2(0.0, a_instance_size.y);
|
||||
vec2 scaled = a_vertex_position * a_instance_size;
|
||||
vec2 world_pos = scaled + instance_pos;
|
||||
|
||||
v_color = a_instance_color;
|
||||
return gl_ModelViewProjectionMatrix * vec4(world_pos, 0.0, 1.0);
|
||||
}
|
||||
|
||||
void main() {
|
||||
GL_TEXTURE0_COORD = gl_MultiTexCoord0.xy;
|
||||
GL_TEXTURE1_COORD = gl_MultiTexCoord1.xy;
|
||||
@@ -156,7 +147,7 @@ void main() {
|
||||
*/
|
||||
|
||||
if (JGL_RENDERING_ROUTINE == J2D_FillRect && JGL_INSTANCED_RENDERING)
|
||||
gl_Position = FillRectInstanced();
|
||||
gl_Position = DefaultInstanced();
|
||||
else
|
||||
gl_Position = Default();
|
||||
}
|
||||
|
Reference in New Issue
Block a user