diff options
Diffstat (limited to 'indra/llrender/llshadermgr.h')
-rw-r--r-- | indra/llrender/llshadermgr.h | 43 |
1 files changed, 36 insertions, 7 deletions
diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h index 67c0d6ab10..a224b2a19b 100644 --- a/indra/llrender/llshadermgr.h +++ b/indra/llrender/llshadermgr.h @@ -44,6 +44,7 @@ public: INVERSE_PROJECTION_MATRIX, // "inv_proj" MODELVIEW_PROJECTION_MATRIX, // "modelview_projection_matrix" INVERSE_MODELVIEW_MATRIX, // "inv_modelview" + IDENTITY_MATRIX, // "identity_matrix" NORMAL_MATRIX, // "normal_matrix" TEXTURE_MATRIX0, // "texture_matrix0" TEXTURE_MATRIX1, // "texture_matrix1" @@ -51,10 +52,15 @@ public: TEXTURE_MATRIX3, // "texture_matrix3" OBJECT_PLANE_S, // "object_plane_s" OBJECT_PLANE_T, // "object_plane_t" + TEXTURE_BASECOLOR_MATRIX, // "texture_basecolor_matrix" (GLTF) + TEXTURE_NORMAL_MATRIX, // "texture_normal_matrix" (GLTF) + TEXTURE_METALLIC_ROUGHNESS_MATRIX, // "texture_metallic_roughness_matrix" (GLTF) + TEXTURE_EMISSIVE_MATRIX, // "texture_emissive_matrix" (GLTF) VIEWPORT, // "viewport" LIGHT_POSITION, // "light_position" LIGHT_DIRECTION, // "light_direction" LIGHT_ATTENUATION, // "light_attenuation" + LIGHT_DEFERRED_ATTENUATION, // "light_deferred_attenuation" LIGHT_DIFFUSE, // "light_diffuse" LIGHT_AMBIENT, // "light_ambient" MULTI_LIGHT_COUNT, // "light_count" @@ -74,12 +80,20 @@ public: PROJECTOR_LOD, // "proj_lod" PROJECTOR_AMBIENT_LOD, // "proj_ambient_lod" DIFFUSE_COLOR, // "color" + EMISSIVE_COLOR, // "emissiveColor" + METALLIC_FACTOR, // "metallicFactor" + ROUGHNESS_FACTOR, // "roughnessFactor" DIFFUSE_MAP, // "diffuseMap" ALTERNATE_DIFFUSE_MAP, // "altDiffuseMap" SPECULAR_MAP, // "specularMap" + EMISSIVE_MAP, // "emissiveMap" BUMP_MAP, // "bumpMap" BUMP_MAP2, // "bumpMap2" ENVIRONMENT_MAP, // "environmentMap" + SCENE_MAP, // "sceneMap" + SCENE_DEPTH, // "sceneDepth" + REFLECTION_PROBES, // "reflectionProbes" + IRRADIANCE_PROBES, // "irradianceProbes" CLOUD_NOISE_MAP, // "cloud_noise_texture" CLOUD_NOISE_MAP_NEXT, // "cloud_noise_texture_next" FULLBRIGHT, // "fullbright" @@ -87,9 +101,12 @@ public: SUNLIGHT_COLOR, // "sunlight_color" AMBIENT, // "ambient_color" BLUE_HORIZON, // "blue_horizon" + BLUE_HORIZON_LINEAR, // "blue_horizon_linear" BLUE_DENSITY, // "blue_density" + BLUE_DENSITY_LINEAR, // "blue_density_linear" HAZE_HORIZON, // "haze_horizon" HAZE_DENSITY, // "haze_density" + HAZE_DENSITY_LINEAR, // "haze_density_linear" CLOUD_SHADOW, // "cloud_shadow" DENSITY_MULTIPLIER, // "density_multiplier" DISTANCE_MULTIPLIER, // "distance_multiplier" @@ -143,6 +160,10 @@ public: DEFERRED_NORM_CUTOFF, // "norm_cutoff" DEFERRED_SHADOW_TARGET_WIDTH, // "shadow_target_width" + MODELVIEW_DELTA_MATRIX, // "modelview_delta" + INVERSE_MODELVIEW_DELTA_MATRIX, // "inv_modelview_delta" + CUBE_SNAPSHOT, // "cube_snapshot" + FXAA_TC_SCALE, // "tc_scale" FXAA_RCP_SCREEN_RES, // "rcp_screen_res" FXAA_RCP_FRAME_OPT, // "rcp_frame_opt" @@ -168,6 +189,8 @@ public: DEFERRED_POSITION, // "positionMap" DEFERRED_DIFFUSE, // "diffuseRect" DEFERRED_SPECULAR, // "specularRect" + DEFERRED_EMISSIVE, // "emissiveRect" + DEFERRED_BRDF_LUT, // "brdfLut" DEFERRED_NOISE, // "noiseMap" DEFERRED_LIGHTFUNC, // "lightFunc" DEFERRED_LIGHT, // "lightMap" @@ -192,6 +215,7 @@ public: WATER_SPECULAR, // "specular" WATER_SPECULAR_EXP, // "lightExp" WATER_FOGCOLOR, // "waterFogColor" + WATER_FOGCOLOR_LINEAR, // "waterFogColorLinear" WATER_FOGDENSITY, // "waterFogDensity" WATER_FOGKS, // "waterFogKS" WATER_REFSCALE, // "refScale" @@ -242,6 +266,8 @@ public: CLOUD_VARIANCE, // "cloud_variance" + REFLECTION_PROBE_AMBIANCE, // "reflection_probe_ambiance" + REFLECTION_PROBE_MAX_LOD, // "max_probe_lod" SH_INPUT_L1R, // "sh_input_r" SH_INPUT_L1G, // "sh_input_g" SH_INPUT_L1B, // "sh_input_b" @@ -250,6 +276,9 @@ public: WATER_EDGE_FACTOR, // "water_edge" SUN_UP_FACTOR, // "sun_up_factor" MOONLIGHT_COLOR, // "moonlight_color" + MOONLIGHT_LINEAR, // "moonlight_LINEAR" + SUNLIGHT_LINEAR, // "sunlight_linear" + AMBIENT_LINEAR, // "ambient_linear" END_RESERVED_UNIFORMS } eGLSLReservedUniforms; // clang-format on @@ -260,11 +289,11 @@ public: virtual void initAttribsAndUniforms(void); BOOL attachShaderFeatures(LLGLSLShader * shader); - void dumpObjectLog(GLhandleARB ret, BOOL warns = TRUE, const std::string& filename = ""); - void dumpShaderSource(U32 shader_code_count, GLcharARB** shader_code_text); - BOOL linkProgramObject(GLhandleARB obj, BOOL suppress_errors = FALSE); - BOOL validateProgramObject(GLhandleARB obj); - GLhandleARB loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, std::unordered_map<std::string, std::string>* defines = NULL, S32 texture_index_channels = -1); + void dumpObjectLog(GLuint ret, BOOL warns = TRUE, const std::string& filename = ""); + void dumpShaderSource(U32 shader_code_count, GLchar** shader_code_text); + BOOL linkProgramObject(GLuint obj, BOOL suppress_errors = FALSE); + BOOL validateProgramObject(GLuint obj); + GLuint loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, std::unordered_map<std::string, std::string>* defines = NULL, S32 texture_index_channels = -1); // Implemented in the application to actually point to the shader directory. virtual std::string getShaderDirPrefix(void) = 0; // Pure Virtual @@ -274,8 +303,8 @@ public: public: // Map of shader names to compiled - std::map<std::string, GLhandleARB> mVertexShaderObjects; - std::map<std::string, GLhandleARB> mFragmentShaderObjects; + std::map<std::string, GLuint> mVertexShaderObjects; + std::map<std::string, GLuint> mFragmentShaderObjects; //global (reserved slot) shader parameters std::vector<std::string> mReservedAttribs; |