Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional Shaders and Graphical Effects #112

Open
wants to merge 56 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
eeb6c0a
Stubbed out dialog box for shader configuration
Zabot May 25, 2016
3aa54c5
Added configuraiton dialog for date and time settings
Zabot May 26, 2016
7206101
Added perlin noise to default shader
Zabot Jun 2, 2016
948dcdd
Modified 'DefaultShader' to use procedural textures
Zabot Jun 2, 2016
2271adf
Added configuration dialog for daylight settings
Zabot Jun 2, 2016
a1c7204
Tweaked shader configuration dialog
Zabot Jun 2, 2016
6c19a86
Refactored procedural textures to use config file
Zabot Jun 8, 2016
6d80f77
Added atmospheric scattering based sky
Zabot Jun 23, 2016
6e391ae
Tweaked sky shader
Zabot Jun 23, 2016
8965134
Merge branch 'perlinShader' into ConfigurationUI
Zabot Jun 23, 2016
d133284
Tweaked sky shader properties and added config props
Zabot Jun 29, 2016
87cf8d6
Added light source list to default shader
Zabot Jun 30, 2016
15984b7
Refactored default shader
Zabot Jul 28, 2016
c87f4fa
Added classes to handle cubemaps and framebuffers
Zabot Jul 28, 2016
99fcb1c
Added a new shader to draw cubemaps to the scene
Zabot Jul 28, 2016
b5df7ed
Added new debug view to display cubemap as skybox
Zabot Jul 28, 2016
70bcf03
Refactored 'SkyShader' to render sky to reusable 'Cubemap'
Zabot Jul 28, 2016
604815d
Modifed default shader to reflect environment map
Zabot Jul 28, 2016
4547e20
Fixed bug where cubemap failed depth test
Zabot Jul 28, 2016
9a55680
Ironed out corners in skybox
Zabot Aug 11, 2016
c6337f5
Added second cubemap to default shader to use for geometry reflections
Zabot Aug 11, 2016
9f32ded
Added the option to calculate sunlight color from environment map
Zabot Aug 11, 2016
d55e579
Added cubemap based geometry reflections
Zabot Aug 11, 2016
1502628
Removed unnecessary lines from 'JOGLTargetShader'
Zabot Aug 11, 2016
55857ec
Fixed bug where different textures bound to same sampler
Zabot Aug 11, 2016
9bf1c5e
Modified reflection map behavior
Zabot Aug 18, 2016
97fa49e
Refactored 'JOGLMaterial' so it no longer extends 'Material'
Zabot Aug 18, 2016
46194c4
Removed extraneous brace
Zabot Aug 18, 2016
49555df
Added configurable option for material reflectance
Zabot Aug 18, 2016
37e4980
Fixed bug where shader used reserved name
Zabot Aug 18, 2016
d93e475
Fixed bug where 'JOGLTextureManager' would try to load procedural tex…
Zabot Aug 18, 2016
a0e0f2a
Changed 'Sky' clear color
Zabot Aug 18, 2016
9b21def
Removed println in drawPrimitive
Zabot Aug 18, 2016
5205b9a
Added logic to handle reflectance maps
Zabot Aug 18, 2016
6b2558c
Merge branch 'ReflectanceMaps' into gsoc-2016
Zabot Aug 18, 2016
2cc1d57
Fixed bug where skyboxes are upsidedown
Zabot Aug 18, 2016
ab427fc
Revert "Refactored 'JOGLMaterial' so it no longer extends 'Material'"
Zabot Aug 20, 2016
f353bde
Added debug colors to skybox
Zabot Aug 20, 2016
2297b5b
Fixed but with user configured reflectance
Zabot Aug 20, 2016
be0146a
Fixed bug where time of day reset
Zabot Aug 20, 2016
1e94365
Added time dependence to lights
Zabot Aug 20, 2016
36b11bd
Reorganized and optimized lighting information
Zabot Aug 21, 2016
6846789
Fixed bug with cubemap based reflections
Zabot Aug 21, 2016
38faa13
Fixed bug with reflectance and JOGLMaterial
Zabot Aug 21, 2016
7180ced
Added hooks for changing geographic position of sky
Zabot Aug 21, 2016
abf5164
Disabled geomtry reflections on reflectance mapped surfaces due to bug
Zabot Aug 21, 2016
c890447
Fixed reflection bug with SSAO and opitmized reflections
Zabot Aug 21, 2016
f2189b3
Added 2D texture support to Framebuffer
Zabot Aug 21, 2016
141d62e
Added planar reflections for water bodies
Zabot Aug 21, 2016
774b65f
Fixed bug where shadow maps did not update
Zabot Aug 21, 2016
8de0a87
Modified 'Framebuffer' to read viewport size from opengl
Zabot Aug 21, 2016
b5b0aa4
Fixed bug where scene would resize if cubemap reflection enabled
Zabot Aug 21, 2016
5844bc8
Refactored how disabling materials is handled
Zabot Aug 21, 2016
6dd7dfe
Fixed various procedural sky bugs
Zabot Aug 21, 2016
f24d053
Added reflection config parameters
Zabot Aug 22, 2016
f89c2ad
Added skybox config options
Zabot Aug 23, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions resources/shaders/cubemap.fragment
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#version 130

uniform samplerCube cubemap;

in vec3 cubemapCoord;

out vec4 FragColor;


void main() {
// cubemapCoord is flipped because images are upside down when loaded by JOGL
FragColor = texture(cubemap, cubemapCoord);
}

18 changes: 18 additions & 0 deletions resources/shaders/cubemap.vertex
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#version 130

uniform mat4 viewMat;
uniform mat4 proMat;

in vec3 VertexPosition;

out vec3 cubemapCoord;


void main() {
cubemapCoord = VertexPosition;
vec4 pos = proMat * mat4(mat3(viewMat)) * vec4(VertexPosition, 1.0);

// Setting the z coordinate to w will push the fragments to the far clipping plane
gl_Position = vec4(pos.xyww);
}

Loading