mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	support for model transition in shader
This commit is contained in:
		
							
								
								
									
										5
									
								
								glhr.cpp
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								glhr.cpp
									
									
									
									
									
								
							| @@ -306,7 +306,7 @@ struct GLprogram { | ||||
|   GLint uFog, uFogColor, uColor, tTexture, tInvExpTable, tAirMap, uMV, uProjection, uAlpha, uFogBase, uPP; | ||||
|   GLint uPRECX, uPRECY, uPRECZ, uIndexSL, uIterations, uLevelLines, uSV, uRadarTransform; | ||||
|   GLint uRotSin, uRotCos, uRotNil; | ||||
|   GLint uDepthScaling, uCamera, uDepth; | ||||
|   GLint uDepthScaling, uCamera, uDepth, uModelTrans; | ||||
|    | ||||
|   flagtype shader_flags; | ||||
|    | ||||
| @@ -377,7 +377,7 @@ GLprogram::GLprogram(string vsh, string fsh) { | ||||
|     uAlpha = -1; | ||||
|     uLevelLines = -1; | ||||
|     uFogColor = -1; | ||||
|     uDepthScaling = uCamera = uDepth = -1; | ||||
|     uDepthScaling = uCamera = uDepth = uModelTrans = -1; | ||||
|      | ||||
|     uColor = tTexture = tInvExpTable = tAirMap = -1; | ||||
|     uFogBase = -1; | ||||
| @@ -443,6 +443,7 @@ GLprogram::GLprogram(string vsh, string fsh) { | ||||
|   uDepth = glGetUniformLocation(_program, "uDepth"); | ||||
|   uDepthScaling = glGetUniformLocation(_program, "uDepthScaling"); | ||||
|   uCamera = glGetUniformLocation(_program, "uCamera"); | ||||
|   uModelTrans = glGetUniformLocation(_program, "uModelTrans"); | ||||
|  | ||||
|   uPRECX = glGetUniformLocation(_program, "PRECX"); | ||||
|   uPRECY = glGetUniformLocation(_program, "PRECY"); | ||||
|   | ||||
| @@ -837,6 +837,9 @@ void display_data::set_projection(int ed, ld shift) { | ||||
|   if(selected->uDepth != -1) | ||||
|     glUniform1f(selected->uDepth, vid.depth); | ||||
|  | ||||
|   if(selected->uModelTrans != -1) | ||||
|     glUniform1f(selected->uModelTrans, pconf.model_transition); | ||||
|  | ||||
|   if(selected->uCamera != -1) | ||||
|     glUniform1f(selected->uCamera, vid.camera); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue