rename brdf_lut

main
Dominik Madarász 2024-08-24 15:29:05 +02:00
parent 4e346fdd9d
commit 444285ca59
6 changed files with 23 additions and 23 deletions

View File

@ -2,26 +2,7 @@
#include "light.glsl"
#include "brdf.glsl"
#include "sh_lighting.glsl"
#ifdef LIGHTMAP_BAKING
void main() {
vec3 n = normalize(v_normal_ws);
vec4 diffuse;
if(u_textured) {
diffuse = texture(u_texture2d, v_texcoord);
} else {
diffuse = u_diffuse; // * v_color;
}
if (u_texlit) {
vec4 litsample = texture(u_lightmap, v_texcoord);
diffuse *= litsample;
}
fragcolor = vec4(diffuse.rgb*u_litboost, 1.0);
}
#endif
#include "lightmap.glsl"
#ifdef SHADING_PHONG
void main() {

View File

@ -0,0 +1,19 @@
#ifdef LIGHTMAP_BAKING
void main() {
vec3 n = normalize(v_normal_ws);
vec4 diffuse;
if(u_textured) {
diffuse = texture(u_texture2d, v_texcoord);
} else {
diffuse = u_diffuse; // * v_color;
}
if (u_texlit) {
vec4 litsample = texture(u_lightmap, v_texcoord);
diffuse *= litsample;
}
fragcolor = vec4(diffuse.rgb*u_litboost, 1.0);
}
#endif

View File

@ -384555,7 +384555,7 @@ static void brdf_load() {
static int program = -1, vao = -1;
if( program < 0 ) {
const char* vs = vfs_read("shaders/vs_0_2_fullscreen_quad_B_flipped.glsl");
const char* fs = vfs_read("shaders/brdf.glsl");
const char* fs = vfs_read("shaders/brdf_lut.glsl");
program = shader(vs, fs, "", "fragcolor", NULL);
glGenVertexArrays( 1, (GLuint*)&vao );

View File

@ -2899,7 +2899,7 @@ static void brdf_load() {
static int program = -1, vao = -1;
if( program < 0 ) {
const char* vs = vfs_read("shaders/vs_0_2_fullscreen_quad_B_flipped.glsl");
const char* fs = vfs_read("shaders/brdf.glsl");
const char* fs = vfs_read("shaders/brdf_lut.glsl");
program = shader(vs, fs, "", "fragcolor", NULL);
glGenVertexArrays( 1, (GLuint*)&vao );

View File

@ -19698,7 +19698,7 @@ static void brdf_load() {
static int program = -1, vao = -1;
if( program < 0 ) {
const char* vs = vfs_read("shaders/vs_0_2_fullscreen_quad_B_flipped.glsl");
const char* fs = vfs_read("shaders/brdf.glsl");
const char* fs = vfs_read("shaders/brdf_lut.glsl");
program = shader(vs, fs, "", "fragcolor", NULL);
glGenVertexArrays( 1, (GLuint*)&vao );