mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-10-30 23:15:32 +01:00 
			
		
		
		
	Restore minimal normal texture support (for minimap shading)
This commit is contained in:
		| @@ -425,6 +425,7 @@ class GameGlobalShaderConstantSetter : public IShaderConstantSetter | |||||||
| 	CachedPixelShaderSetting<float, 3> m_camera_offset_pixel; | 	CachedPixelShaderSetting<float, 3> m_camera_offset_pixel; | ||||||
| 	CachedPixelShaderSetting<float, 3> m_camera_offset_vertex; | 	CachedPixelShaderSetting<float, 3> m_camera_offset_vertex; | ||||||
| 	CachedPixelShaderSetting<SamplerLayer_t> m_base_texture; | 	CachedPixelShaderSetting<SamplerLayer_t> m_base_texture; | ||||||
|  | 	CachedPixelShaderSetting<SamplerLayer_t> m_normal_texture; | ||||||
| 	Client *m_client; | 	Client *m_client; | ||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
| @@ -458,6 +459,7 @@ public: | |||||||
| 		m_camera_offset_pixel("cameraOffset"), | 		m_camera_offset_pixel("cameraOffset"), | ||||||
| 		m_camera_offset_vertex("cameraOffset"), | 		m_camera_offset_vertex("cameraOffset"), | ||||||
| 		m_base_texture("baseTexture"), | 		m_base_texture("baseTexture"), | ||||||
|  | 		m_normal_texture("normalTexture"), | ||||||
| 		m_client(client) | 		m_client(client) | ||||||
| 	{ | 	{ | ||||||
| 		g_settings->registerChangedCallback("enable_fog", settingsCallback, this); | 		g_settings->registerChangedCallback("enable_fog", settingsCallback, this); | ||||||
| @@ -545,8 +547,9 @@ public: | |||||||
| 		m_camera_offset_pixel.set(camera_offset_array, services); | 		m_camera_offset_pixel.set(camera_offset_array, services); | ||||||
| 		m_camera_offset_vertex.set(camera_offset_array, services); | 		m_camera_offset_vertex.set(camera_offset_array, services); | ||||||
| 
 | 
 | ||||||
| 		SamplerLayer_t base_tex = 0; | 		SamplerLayer_t base_tex = 0, normal_tex = 1; | ||||||
| 		m_base_texture.set(&base_tex, services); | 		m_base_texture.set(&base_tex, services); | ||||||
|  | 		m_normal_texture.set(&normal_tex, services); | ||||||
| 	} | 	} | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user