mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-11-18 22:55:12 +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 uFog, uFogColor, uColor, tTexture, tInvExpTable, tAirMap, uMV, uProjection, uAlpha, uFogBase, uPP;
|
||||||
GLint uPRECX, uPRECY, uPRECZ, uIndexSL, uIterations, uLevelLines, uSV, uRadarTransform;
|
GLint uPRECX, uPRECY, uPRECZ, uIndexSL, uIterations, uLevelLines, uSV, uRadarTransform;
|
||||||
GLint uRotSin, uRotCos, uRotNil;
|
GLint uRotSin, uRotCos, uRotNil;
|
||||||
GLint uDepthScaling, uCamera, uDepth;
|
GLint uDepthScaling, uCamera, uDepth, uModelTrans;
|
||||||
|
|
||||||
flagtype shader_flags;
|
flagtype shader_flags;
|
||||||
|
|
||||||
@@ -377,7 +377,7 @@ GLprogram::GLprogram(string vsh, string fsh) {
|
|||||||
uAlpha = -1;
|
uAlpha = -1;
|
||||||
uLevelLines = -1;
|
uLevelLines = -1;
|
||||||
uFogColor = -1;
|
uFogColor = -1;
|
||||||
uDepthScaling = uCamera = uDepth = -1;
|
uDepthScaling = uCamera = uDepth = uModelTrans = -1;
|
||||||
|
|
||||||
uColor = tTexture = tInvExpTable = tAirMap = -1;
|
uColor = tTexture = tInvExpTable = tAirMap = -1;
|
||||||
uFogBase = -1;
|
uFogBase = -1;
|
||||||
@@ -443,6 +443,7 @@ GLprogram::GLprogram(string vsh, string fsh) {
|
|||||||
uDepth = glGetUniformLocation(_program, "uDepth");
|
uDepth = glGetUniformLocation(_program, "uDepth");
|
||||||
uDepthScaling = glGetUniformLocation(_program, "uDepthScaling");
|
uDepthScaling = glGetUniformLocation(_program, "uDepthScaling");
|
||||||
uCamera = glGetUniformLocation(_program, "uCamera");
|
uCamera = glGetUniformLocation(_program, "uCamera");
|
||||||
|
uModelTrans = glGetUniformLocation(_program, "uModelTrans");
|
||||||
|
|
||||||
uPRECX = glGetUniformLocation(_program, "PRECX");
|
uPRECX = glGetUniformLocation(_program, "PRECX");
|
||||||
uPRECY = glGetUniformLocation(_program, "PRECY");
|
uPRECY = glGetUniformLocation(_program, "PRECY");
|
||||||
|
|||||||
@@ -837,6 +837,9 @@ void display_data::set_projection(int ed, ld shift) {
|
|||||||
if(selected->uDepth != -1)
|
if(selected->uDepth != -1)
|
||||||
glUniform1f(selected->uDepth, vid.depth);
|
glUniform1f(selected->uDepth, vid.depth);
|
||||||
|
|
||||||
|
if(selected->uModelTrans != -1)
|
||||||
|
glUniform1f(selected->uModelTrans, pconf.model_transition);
|
||||||
|
|
||||||
if(selected->uCamera != -1)
|
if(selected->uCamera != -1)
|
||||||
glUniform1f(selected->uCamera, vid.camera);
|
glUniform1f(selected->uCamera, vid.camera);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user