mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-26 14:03:01 +00:00
Adjust light map rendering to allow for over-exposure
This commit is contained in:
parent
d2644e6640
commit
c2a40b1564
2 changed files with 20 additions and 15 deletions
|
@ -274,6 +274,7 @@ void gfx_direct3d_common_build_shader(char buf[4096], size_t& len, size_t& num_f
|
|||
} else {
|
||||
append_line(buf, &len, " float4 texVal1 = g_texture1.Sample(g_sampler1, input.lightmap);");
|
||||
}
|
||||
append_line(buf, &len, " texVal1.rgb = texVal1.rgb * texVal1.rgb + texVal1.rgb;");
|
||||
} else {
|
||||
if (three_point_filtering) {
|
||||
append_line(buf, &len, " float4 texVal1;");
|
||||
|
|
|
@ -383,6 +383,9 @@ static struct ShaderProgram *gfx_opengl_create_and_load_new_shader(struct ColorC
|
|||
}
|
||||
}
|
||||
|
||||
if (opt_light_map) {
|
||||
append_str(fs_buf, &fs_len, "vec3 texel = texVal0.rgb * (texVal1.rgb * texVal1.rgb + texVal1.rgb);\n");
|
||||
} else {
|
||||
append_str(fs_buf, &fs_len, (opt_alpha) ? "vec4 texel = " : "vec3 texel = ");
|
||||
for (int i = 0; i < (opt_2cycle + 1); i++) {
|
||||
u8* cmd = &cc->shader_commands[i * 8];
|
||||
|
@ -401,6 +404,7 @@ static struct ShaderProgram *gfx_opengl_create_and_load_new_shader(struct ColorC
|
|||
append_str(fs_buf, &fs_len, "texel = ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (opt_texture_edge && opt_alpha) {
|
||||
append_line(fs_buf, &fs_len, "if (texel.a > 0.3) texel.a = 1.0; else discard;");
|
||||
|
|
Loading…
Reference in a new issue