Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cohle
glChAoS-P
Commits
03b23c42
Commit
03b23c42
authored
Jul 10, 2020
by
BrutPitt
Browse files
ver. 1.5.3 Release - Intermediate release with some new features and improvements
parent
a56155e8
Changes
5
Hide whitespace changes
Inline
Side-by-side
readme.md
View file @
03b23c42
...
@@ -34,7 +34,8 @@ Is also possible to travel, in first person (cockpit view), within the particles
...
@@ -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>
<img
src=
"https://raw.githubusercontent.com/BrutPitt/myRepos/master/glChAoSP/screenShots/lorenz1.gif"
style=
"width: 1024px;"
></a>
</p>
</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
*
*use "**v**" key or "**cockpit**" button (from **Attractors** tools window) to switch to subjective view (on right)*
<p>
<br></p>
<p>
<br></p>
...
...
src/src/ShadersClasses.cpp
View file @
03b23c42
...
@@ -184,12 +184,6 @@ GLuint particlesBaseClass::render(GLuint fbIdx, emitterBaseClass *emitter, bool
...
@@ -184,12 +184,6 @@ GLuint particlesBaseClass::render(GLuint fbIdx, emitterBaseClass *emitter, bool
const
float
dist
=
currentTMat
->
getOverallDistance
()
<
FLT_EPSILON
?
FLT_EPSILON
:
currentTMat
->
getOverallDistance
();
const
float
dist
=
currentTMat
->
getOverallDistance
()
<
FLT_EPSILON
?
FLT_EPSILON
:
currentTMat
->
getOverallDistance
();
setLightDir
(
normalize
(
getLightDir
())
*
(
dist
*
(
theApp
->
useDetailedShadows
()
?
1.5
f
:
1.5
f
/* 2/2.5*/
)
+
dist
*
.1
f
));
setLightDir
(
normalize
(
getLightDir
())
*
(
dist
*
(
theApp
->
useDetailedShadows
()
?
1.5
f
:
1.5
f
/* 2/2.5*/
)
+
dist
*
.1
f
));
}
}
//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
);
glViewport
(
0
,
0
,
getUData
().
scrnRes
.
x
*
shadowDetail
,
getUData
().
scrnRes
.
y
*
shadowDetail
);
getShadow
()
->
bindRender
();
getShadow
()
->
bindRender
();
...
@@ -207,7 +201,6 @@ GLuint particlesBaseClass::render(GLuint fbIdx, emitterBaseClass *emitter, bool
...
@@ -207,7 +201,6 @@ GLuint particlesBaseClass::render(GLuint fbIdx, emitterBaseClass *emitter, bool
emitter
->
renderEvents
();
emitter
->
renderEvents
();
getShadow
()
->
releaseRender
();
getShadow
()
->
releaseRender
();
//glViewport(vp.x,vp.y, vp.z, vp.w);
//FIXME: POV.z+Dolly.z (shadow) ==> look UP
//FIXME: POV.z+Dolly.z (shadow) ==> look UP
currentTMat
->
setPOV
(
tmpPov
);
currentTMat
->
setPOV
(
tmpPov
);
...
@@ -832,11 +825,13 @@ GLuint fxaaClass::render(GLuint texIn, bool useFB)
...
@@ -832,11 +825,13 @@ GLuint fxaaClass::render(GLuint texIn, bool useFB)
bindPipeline
();
bindPipeline
();
#if !defined(GLCHAOSP_LIGHTVER)
#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
#else
glBindFramebuffer
(
GL_DRAW_FRAMEBUFFER
,
0
)
;
const
GLuint
fbID
=
0
;
#endif
#endif
glBindFramebuffer
(
GL_DRAW_FRAMEBUFFER
,
fbID
);
#ifdef GLAPP_REQUIRE_OGL45
#ifdef GLAPP_REQUIRE_OGL45
glBindTextureUnit
(
0
,
texIn
);
glBindTextureUnit
(
0
,
texIn
);
#else
#else
...
...
src/src/ShadersClasses.h
View file @
03b23c42
...
@@ -577,8 +577,7 @@ public:
...
@@ -577,8 +577,7 @@ public:
void
setRenderMode
(
int
which
);
void
setRenderMode
(
int
which
);
int
getRenderMode
()
{
return
whichRenderMode
;
}
int
getRenderMode
()
{
return
whichRenderMode
;
}
mmFBO
&
getRenderFBO
()
{
return
renderFBO
;
};
mmFBO
&
getRenderFBO
()
{
return
renderFBO
;
};
//mmFBO &getMSAAFBO() { return msaaFBO; };
//mmFBO &getMSAAFBO() { return msaaFBO; };
int
getWidth
()
{
return
getRenderFBO
().
getSizeX
();
}
int
getWidth
()
{
return
getRenderFBO
().
getSizeX
();
}
int
getHeight
()
{
return
getRenderFBO
().
getSizeY
();
}
int
getHeight
()
{
return
getRenderFBO
().
getSizeY
();
}
...
@@ -1088,6 +1087,13 @@ public:
...
@@ -1088,6 +1087,13 @@ public:
#endif
#endif
}
}
void
clearFB
(
GLuint
fbID
)
{
glBindFramebuffer
(
GL_DRAW_FRAMEBUFFER
,
fbID
);
glViewport
(
0
,
0
,
getWidth
(),
getHeight
());
glClearBufferfv
(
GL_COLOR
,
0
,
value_ptr
(
backgroundColor
()));
}
void
setCommonData
()
{
void
setCommonData
()
{
#ifdef GLAPP_REQUIRE_OGL45
#ifdef GLAPP_REQUIRE_OGL45
uniformBlocksClass
::
create
(
GLuint
(
sizeof
(
uParticlesData
)),
(
void
*
)
&
uData
);
uniformBlocksClass
::
create
(
GLuint
(
sizeof
(
uParticlesData
)),
(
void
*
)
&
uData
);
...
...
src/src/glWindow.cpp
View file @
03b23c42
...
@@ -101,9 +101,7 @@ GLint glWindow::onRender()
...
@@ -101,9 +101,7 @@ GLint glWindow::onRender()
{
{
particlesSystem
->
renderPalette
();
particlesSystem
->
renderPalette
();
glBindFramebuffer
(
GL_DRAW_FRAMEBUFFER
,
0
);
particlesSystem
->
getParticleRenderPtr
()
->
clearFB
(
0
);
glViewport
(
0
,
0
,
particlesSystem
->
getWidth
(),
particlesSystem
->
getHeight
());
glClearBufferfv
(
GL_COLOR
,
0
,
value_ptr
(
particlesSystem
->
getParticleRenderPtr
()
->
backgroundColor
()));
#if !defined(GLCHAOSP_LIGHTVER)
#if !defined(GLCHAOSP_LIGHTVER)
...
...
src/src/partSystem.cpp
View file @
03b23c42
...
@@ -236,12 +236,13 @@ GLuint particlesSystemClass::renderTF()
...
@@ -236,12 +236,13 @@ GLuint particlesSystemClass::renderTF()
texRendered
=
renderParticles
(
false
,
cPit
.
invertPIP
());
texRendered
=
renderParticles
(
false
,
cPit
.
invertPIP
());
texRendered
=
renderGlowEffect
(
texRendered
);
texRendered
=
renderGlowEffect
(
texRendered
);
}
}
glViewport
(
0
,
0
,
w
,
h
);
#if !defined(GLCHAOSP_NO_FXAA)
#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
#endif
getEmitter
()
->
postRenderEvents
();
getEmitter
()
->
postRenderEvents
();
return
texRendered
;
return
texRendered
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment