miss shader
This commit is contained in:
@@ -16,20 +16,21 @@ void main(void) {
|
||||
|
||||
in vec3 view_dir, world_dir;
|
||||
|
||||
uniform vec2 dt, shadow_size;
|
||||
uniform vec2 dt;
|
||||
uniform float z_near;
|
||||
uniform sampler2D tex_coeff_brdf, tex_noise;
|
||||
uniform sampler2D tex_0, tex_1, tex_2, tex_3, tex_4, tex_5, tex_sh;
|
||||
//uniform sampler2DShadow tex_shadow[16];
|
||||
uniform vec2 shadow_size;
|
||||
uniform sampler2DArrayShadow tex_shadows_cone;
|
||||
uniform sampler2DArray tex_depths_cone;
|
||||
uniform samplerCubeArrayShadow tex_shadows_omni;
|
||||
uniform samplerCubeArray tex_depths_omni;
|
||||
uniform samplerCube tex_env;
|
||||
uniform int lights_start, lights_count, soft_shadows_samples = 16, noise_size = 64;
|
||||
uniform bool soft_shadows_enabled = false;
|
||||
uniform bool soft_shadows_enabled = false, shadows_enabled = false;
|
||||
uniform float soft_shadows_quality = 1.;
|
||||
|
||||
uniform int soft_shadows_samples = 16, noise_size = 64;
|
||||
uniform samplerCube tex_env;
|
||||
uniform int lights_start, lights_count;
|
||||
uniform vec4 fog_color = vec4(0.5, 0.5, 0.5, 1.);
|
||||
uniform float fog_decay = 10., fog_density = 0.;
|
||||
uniform mat3 view_mat;
|
||||
@@ -43,7 +44,7 @@ ivec2 tc;
|
||||
vec4 pos, lpos, shp;
|
||||
vec3 li, si, ldir, halfV, bn, bn2, lwdir;
|
||||
vec3 normal, geom_normal, vds, vds2;
|
||||
float rough_diff, rough_spec, dist, NdotL, NdotH, spot, ldist, diff, spec, sdist, shadow, shadow_dz;
|
||||
float rough_diff, rough_spec, dist, NdotL, NdotH, spot, ldist, diff, spec, sdist;
|
||||
uint flags;
|
||||
|
||||
|
||||
@@ -173,7 +174,7 @@ void calcLight(in int index, in vec3 n, in vec3 v) {
|
||||
spot *= light_map_pix.a;
|
||||
#endif
|
||||
|
||||
if (int(round(qgl_light_parameter[index].flags)) == 1 && bitfieldExtract(flags, 3, 1) == 1 && (spot > 1E-4)) {
|
||||
if (shadows_enabled && (int(round(qgl_light_parameter[index].flags)) == 1) && (bitfieldExtract(flags, 3, 1) == 1) && (spot > 1E-4)) {
|
||||
#ifndef SPOT
|
||||
vec3 odir = -(view_mat * ldir);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user