nv2a/vk: Set specular power uniform

This commit is contained in:
Matt Borgerson 2025-04-16 20:15:16 -07:00
parent 679f6d06bd
commit f648829367
1 changed files with 8 additions and 0 deletions

View File

@ -313,6 +313,9 @@ static void update_shader_constant_locations(ShaderBinding *binding)
binding->uniform_attrs_loc =
uniform_index(&binding->vertex->uniforms, "inlineValue");
binding->specular_power_loc =
uniform_index(&binding->vertex->uniforms, "specularPower");
}
static void shader_cache_entry_init(Lru *lru, LruNode *node, void *state)
@ -607,6 +610,11 @@ static void shader_update_constants(PGRAPHState *pg, ShaderBinding *binding,
}
}
if (binding->specular_power_loc != -1) {
uniform1f(&binding->vertex->uniforms, binding->specular_power_loc,
pg->specular_power);
}
/* estimate the viewport by assuming it matches the surface ... */
unsigned int aa_width = 1, aa_height = 1;
pgraph_apply_anti_aliasing_factor(pg, &aa_width, &aa_height);