new: frame_time uniform
parent
23c860ab99
commit
038386ef2d
|
@ -385943,6 +385943,14 @@ void model_set_uniforms(model_t m, int shader, mat44 mv, mat44 proj, mat44 view,
|
||||||
glUniform1i(loc, m.flags & MODEL_MATCAPS ? GL_TRUE:GL_FALSE);
|
glUniform1i(loc, m.flags & MODEL_MATCAPS ? GL_TRUE:GL_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((loc = glGetUniformLocation(shader, "frame_count")) >= 0) {
|
||||||
|
glUniform1i(loc, (unsigned)window_frame());
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((loc = glGetUniformLocation(shader, "frame_time")) >= 0) {
|
||||||
|
glUniform1f(loc, (float)window_time());
|
||||||
|
}
|
||||||
|
|
||||||
if (m.shading == SHADING_PBR) {
|
if (m.shading == SHADING_PBR) {
|
||||||
handle old_shader = last_shader;
|
handle old_shader = last_shader;
|
||||||
shader_bind(shader);
|
shader_bind(shader);
|
||||||
|
@ -385961,7 +385969,6 @@ void model_set_uniforms(model_t m, int shader, mat44 mv, mat44 proj, mat44 view,
|
||||||
shader_texture( "tex_skyenv", m.sky_env );
|
shader_texture( "tex_skyenv", m.sky_env );
|
||||||
}
|
}
|
||||||
shader_texture( "tex_brdf_lut", brdf_lut() );
|
shader_texture( "tex_brdf_lut", brdf_lut() );
|
||||||
shader_uint( "frame_count", (unsigned)window_frame() );
|
|
||||||
shader_bind(old_shader);
|
shader_bind(old_shader);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3309,6 +3309,14 @@ void model_set_uniforms(model_t m, int shader, mat44 mv, mat44 proj, mat44 view,
|
||||||
glUniform1i(loc, m.flags & MODEL_MATCAPS ? GL_TRUE:GL_FALSE);
|
glUniform1i(loc, m.flags & MODEL_MATCAPS ? GL_TRUE:GL_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((loc = glGetUniformLocation(shader, "frame_count")) >= 0) {
|
||||||
|
glUniform1i(loc, (unsigned)window_frame());
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((loc = glGetUniformLocation(shader, "frame_time")) >= 0) {
|
||||||
|
glUniform1f(loc, (float)window_time());
|
||||||
|
}
|
||||||
|
|
||||||
if (m.shading == SHADING_PBR) {
|
if (m.shading == SHADING_PBR) {
|
||||||
handle old_shader = last_shader;
|
handle old_shader = last_shader;
|
||||||
shader_bind(shader);
|
shader_bind(shader);
|
||||||
|
@ -3327,7 +3335,6 @@ void model_set_uniforms(model_t m, int shader, mat44 mv, mat44 proj, mat44 view,
|
||||||
shader_texture( "tex_skyenv", m.sky_env );
|
shader_texture( "tex_skyenv", m.sky_env );
|
||||||
}
|
}
|
||||||
shader_texture( "tex_brdf_lut", brdf_lut() );
|
shader_texture( "tex_brdf_lut", brdf_lut() );
|
||||||
shader_uint( "frame_count", (unsigned)window_frame() );
|
|
||||||
shader_bind(old_shader);
|
shader_bind(old_shader);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20482,6 +20482,14 @@ void model_set_uniforms(model_t m, int shader, mat44 mv, mat44 proj, mat44 view,
|
||||||
glUniform1i(loc, m.flags & MODEL_MATCAPS ? GL_TRUE:GL_FALSE);
|
glUniform1i(loc, m.flags & MODEL_MATCAPS ? GL_TRUE:GL_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((loc = glGetUniformLocation(shader, "frame_count")) >= 0) {
|
||||||
|
glUniform1i(loc, (unsigned)window_frame());
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((loc = glGetUniformLocation(shader, "frame_time")) >= 0) {
|
||||||
|
glUniform1f(loc, (float)window_time());
|
||||||
|
}
|
||||||
|
|
||||||
if (m.shading == SHADING_PBR) {
|
if (m.shading == SHADING_PBR) {
|
||||||
handle old_shader = last_shader;
|
handle old_shader = last_shader;
|
||||||
shader_bind(shader);
|
shader_bind(shader);
|
||||||
|
@ -20500,7 +20508,6 @@ void model_set_uniforms(model_t m, int shader, mat44 mv, mat44 proj, mat44 view,
|
||||||
shader_texture( "tex_skyenv", m.sky_env );
|
shader_texture( "tex_skyenv", m.sky_env );
|
||||||
}
|
}
|
||||||
shader_texture( "tex_brdf_lut", brdf_lut() );
|
shader_texture( "tex_brdf_lut", brdf_lut() );
|
||||||
shader_uint( "frame_count", (unsigned)window_frame() );
|
|
||||||
shader_bind(old_shader);
|
shader_bind(old_shader);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue