DB/LightData: Difference between revisions
Jump to navigation
Jump to search
m (→7.0.1.?) |
m (→7.0.1.?) |
||
Line 62: | Line 62: | ||
==7.0.1.?== | ==7.0.1.?== | ||
color grading added, new column listing colorgrading blp. falls back to fid 1140733 (identity). apparently having more than 32 color graded skies on one map will hit a hardcoded limit. apparently two entries (night, day) at least. | color grading added, new column listing colorgrading blp. falls back to fid 1140733 (identity). apparently having more than 32 color graded skies on one map will hit a hardcoded limit. apparently two entries (night, day) at least. | ||
#version 420 | |||
layout(location = 1) in vec2 in_tc0; | |||
layout(location = 0) out vec4 out_result; | |||
uniform sampler2D pt_screenTex; // original color | |||
uniform sampler2D pt_mapping; // 1024 * 32px color mapping | |||
#define dim 32.0 | |||
void main() | |||
{ | |||
vec4 original_color = texture(pt_screenTex, in_tc0); | |||
float u = original_color.r * (dim - 1.0); | |||
float v = original_color.g * (dim - 1.0); | |||
float w = original_color.b * (dim - 1.0); | |||
float leftSlice = floor(w); | |||
float rightSlice = leftSlice + 1.0; | |||
float u1 = (u + leftSlice * dim); | |||
float u2 = (u + rightSlice * dim); | |||
vec4 c1 = texture(pt_mapping, vec2(u1 + 0.5, v + 0.5) / vec2 (dim * dim, dim)); | |||
vec4 c2 = texture(pt_mapping, vec2(u2 + 0.5, v + 0.5) / vec2 (dim * dim, dim)); | |||
out_result = vec4(mix(c1, c2, vec4(fract(w))).rgb, original_color.a); | |||
} | |||
[[Category:DBC]] | [[Category:DBC]] | ||
[[Category:DBC_WoD]][[Category:6.0.1.18179]] | [[Category:DBC_WoD]][[Category:6.0.1.18179]] |
Revision as of 02:09, 3 January 2018
Contains information of LightIntBand.dbc and LightFloatBand.dbc
The number of lines depends on the precision of the Time Values
Column Description Notes 1 ID 2 Sky ID This is a ref to LightParams.dbc 3 Time values 4 Global diffuse light 5 Global ambient light 6 Sky color 0 (top) 7 Sky color 1 (middle) 8 Sky color 2 (middle to horizon) 9 Sky color 3 (above horizon) 10 Sky color 4 (horizon) 11 Fog color / background mountains color 12 Sun color + sun halo color 13 Sun larger halo color 14 Cloud color 15 ? This is the same value as the 11th row of LightIntBand 16 ? This is the same value as the 13th row of LightIntBand 17 ? This is the same value as the 14th row of LightIntBand 18 Water color [dark] 19 Water color [light] 20 Shadow color 21 ? This is the same value as the 8th row of LightIntBand 22 Fog distance multiplied by 36 23 Fog multiplier? 24 ? This is the same value as the 4th row of LightFloatBand
6.0.1.18179
struct LightDataRec { uint32_t m_ID; uint32_t m_lightParamID; uint32_t m_time; uint32_t m_directColor; uint32_t m_ambientColor; uint32_t m_skyTopColor; uint32_t m_skyMiddleColor; uint32_t m_skyBand1Color; uint32_t m_skyBand2Color; uint32_t m_skySmogColor; uint32_t m_skyFogColor; uint32_t m_sunColor; uint32_t m_cloudSunColor; uint32_t m_cloudEmissiveColor; uint32_t m_cloudLayer1AmbientColor; uint32_t m_cloudLayer2AmbientColor; uint32_t m_oceanCloseColor; uint32_t m_oceanFarColor; uint32_t m_riverCloseColor; uint32_t m_riverFarColor; uint32_t m_shadowOpacity; float m_fogEnd; float m_fogScaler; float m_cloudDensity; float m_fogDensity; };
7.0.1.?
color grading added, new column listing colorgrading blp. falls back to fid 1140733 (identity). apparently having more than 32 color graded skies on one map will hit a hardcoded limit. apparently two entries (night, day) at least.
#version 420 layout(location = 1) in vec2 in_tc0; layout(location = 0) out vec4 out_result; uniform sampler2D pt_screenTex; // original color uniform sampler2D pt_mapping; // 1024 * 32px color mapping
#define dim 32.0 void main() { vec4 original_color = texture(pt_screenTex, in_tc0); float u = original_color.r * (dim - 1.0); float v = original_color.g * (dim - 1.0); float w = original_color.b * (dim - 1.0);
float leftSlice = floor(w); float rightSlice = leftSlice + 1.0; float u1 = (u + leftSlice * dim); float u2 = (u + rightSlice * dim); vec4 c1 = texture(pt_mapping, vec2(u1 + 0.5, v + 0.5) / vec2 (dim * dim, dim)); vec4 c2 = texture(pt_mapping, vec2(u2 + 0.5, v + 0.5) / vec2 (dim * dim, dim));
out_result = vec4(mix(c1, c2, vec4(fract(w))).rgb, original_color.a); }