Commit 03b23c42 authored by BrutPitt's avatar BrutPitt
Browse files

ver. 1.5.3 Release - Intermediate release with some new features and improvements

parent a56155e8
......@@ -34,7 +34,8 @@ Is also possible to travel, in first person (cockpit view), within the particles
<img src="https://raw.githubusercontent.com/BrutPitt/myRepos/master/glChAoSP/screenShots/lorenz1.gif" style="width: 1024px;"></a>
</p>
***Lorenz Attractor** - click on image to "explore" it in WebGL ("cockpit" form Attractors tools window for subjective view)*
***Lorenz Attractor** - click on image to "explore" it in WebGL*
&nbsp; &nbsp; &nbsp; &nbsp;*use "**v**" key or "**cockpit**" button (from **Attractors** tools window) to switch to subjective view (on right)*
<p>&nbsp;<br></p>
......
......@@ -184,12 +184,6 @@ GLuint particlesBaseClass::render(GLuint fbIdx, emitterBaseClass *emitter, bool
const float dist = currentTMat->getOverallDistance()<FLT_EPSILON ? FLT_EPSILON : currentTMat->getOverallDistance();
setLightDir(normalize(getLightDir()) * (dist*(theApp->useDetailedShadows() ? 1.5f : 1.5f /* 2/2.5*/) + dist*.1f));
}
//if(shadowDetail>1) glViewport(0,0, getUData().scrnRes.x*shadowDetail, getUData().scrnRes.y*shadowDetail);
//ivec4 vp;
//if(isTFRender) glGetIntegerv(GL_VIEWPORT, (GLint *) value_ptr(vp)); // partial reverted: https://github.com/BrutPitt/glChAoS.P/commit/4bcfc6dd577255ac9460fcc656bcf6796e917c46#
//else vp = {0, 0, int(getUData().scrnRes.x), int(getUData().scrnRes.y) };
glViewport(0,0, getUData().scrnRes.x*shadowDetail, getUData().scrnRes.y*shadowDetail);
getShadow()->bindRender();
......@@ -207,7 +201,6 @@ GLuint particlesBaseClass::render(GLuint fbIdx, emitterBaseClass *emitter, bool
emitter->renderEvents();
getShadow()->releaseRender();
//glViewport(vp.x,vp.y, vp.z, vp.w);
//FIXME: POV.z+Dolly.z (shadow) ==> look UP
currentTMat->setPOV(tmpPov);
......@@ -832,11 +825,13 @@ GLuint fxaaClass::render(GLuint texIn, bool useFB)
bindPipeline();
#if !defined(GLCHAOSP_LIGHTVER)
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, useFB || renderEngine->getMotionBlur()->Active() ? fbo.getFB(0) : 0);
const GLuint fbID = useFB || renderEngine->getMotionBlur()->Active() ? fbo.getFB(0) : 0;
#else
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
const GLuint fbID = 0;
#endif
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbID);
#ifdef GLAPP_REQUIRE_OGL45
glBindTextureUnit(0, texIn);
#else
......
......@@ -577,8 +577,7 @@ public:
void setRenderMode(int which);
int getRenderMode() { return whichRenderMode; }
mmFBO &getRenderFBO() { return renderFBO; };
mmFBO &getRenderFBO() { return renderFBO; };
//mmFBO &getMSAAFBO() { return msaaFBO; };
int getWidth() { return getRenderFBO().getSizeX(); }
int getHeight() { return getRenderFBO().getSizeY(); }
......@@ -1088,6 +1087,13 @@ public:
#endif
}
void clearFB(GLuint fbID) {
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbID);
glViewport(0,0, getWidth(), getHeight());
glClearBufferfv(GL_COLOR, 0, value_ptr(backgroundColor()));
}
void setCommonData() {
#ifdef GLAPP_REQUIRE_OGL45
uniformBlocksClass::create(GLuint(sizeof(uParticlesData)), (void *) &uData);
......
......@@ -101,9 +101,7 @@ GLint glWindow::onRender()
{
particlesSystem->renderPalette();
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
glViewport(0,0, particlesSystem->getWidth(), particlesSystem->getHeight());
glClearBufferfv(GL_COLOR, 0, value_ptr(particlesSystem->getParticleRenderPtr()->backgroundColor()));
particlesSystem->getParticleRenderPtr()->clearFB(0);
#if !defined(GLCHAOSP_LIGHTVER)
......
......@@ -236,12 +236,13 @@ GLuint particlesSystemClass::renderTF()
texRendered = renderParticles(false, cPit.invertPIP());
texRendered = renderGlowEffect(texRendered);
}
glViewport(0,0, w, h);
#if !defined(GLCHAOSP_NO_FXAA)
texRendered = renderFXAA(texRendered);
//FIXME: currently disabled FXAA on splitView
if(cPit.cockPit() && cPit.getPIPposition() != cPit.pip::splitView) {
glViewport(0,0, w, h);
texRendered = renderFXAA(texRendered);
}
#endif
getEmitter()->postRenderEvents();
return texRendered;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment