-
Notifications
You must be signed in to change notification settings - Fork 125
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
base: master
Are you sure you want to change the base?
Conversation
Only one reflection map is generated per building, instead of one per primitive. Reflection maps are updated whenever the view changes.
97fa49 seemed to be causing some serious performance and stablity issues. This reverts commit 97fa49e.
Thanks for the pull request, great work overall! I'm still going through it, but here's a few issues I've noticed so far:
|
please use JTattoo or somthing like his to change to custome the UI it could be better @Zabot |
And JOGLTargetShader.java doesn't work , |
@klobot, can you describe what is happening? |
An execption occured , the programm started then after few second is closing , |
problem solved ,it was crazy easy , you just forgot to debug but it works on mine now |
@klobot That's great! Can you post a gist or a commit with your fixes so I can merge them? |
Product of Google Summer of Code 2016. The last summer of code commit was f89c2ad.
More config, usage, and demo information coming soon.
Procedural Textures
Texture layers can be configured to use Perlin noise instead of reading from a file. This effect allows surfaces to still have a textured, visually interesting appearance, without the obvious wrapping, scaling, and repeating that occurs when using a static texture.
Materials can also be configured to use Perlin noise to calculate surface normal vectors for lighting calculations, producing effects like water ripples and even more interesting texture, though this feature is still experimental.
Config Parameters
material_NAME_textureN_procedural (default false)
-- Enables a procedural texture for this layer.material_NAME_textureN_baseColor (default #FFFFFF)
-- The base color of the layer. The color of the layer will vary, centered around this value.material_NAME_textureN_deviation (default #969664)
-- The maximum difference between the final color of a pixel andbaseColor
on each channel.material_NAME_textureN_xScale
andmaterial_NAME_textureN_yScale (default 1.0)
-- The relative frequency of the noise in the x and y direction. Higher values produce higher frequency noise.material_NAME_normalDeviation (default 0.0)
-- The maximum deviation of a perceived normal from the true normal of a plane. Higher values produce a more extreme effect.Procedural Sky
Instead of a black background, the scene can be filled with a clear sky, generated by simulating the scattering caused by the atmosphere. This sky is then saved as a skybox, so the performance impact is minimal. Generating the sky procedurally allows the user to see the sun move across the sky, as well as produce sunsets. The sky is can also be used to determine the color of the sunlight in the scene, causing an orange hue to be splashed across the scene at sunset.
Config Parameters
skybox (default "none")
-- The type of skybox to use. Set toprocedural
for the procedural sky, andstatic
to provide a list of images to use.skybox_posx
,skybox_negx
,...
-- The images to use for each face of the skybox if you are using a static skybox. Note thatuseEnvLighting
will be disabled if you use a static skybox.timeAndDate (default "Jan 1 12:00")
-- The time to use for calculating the position of the sun in the sky.scatterColor (default #8CB3CC)
-- The ambient sky color. The amount of light scattered from each channel by the sky. The higher a channel is, the more of that color you see when the sun is high in the sky, and the less you see when the sun is lower in the sky.useEnvLighting (default false)
-- Use the color of the sky to calculate the ambient scene lighting.Multiple Light Sources
Street lamps now have an associated point light source on top. There aren't any associated configuration options, but additional light sources can be added to any object with
Target.drawLight()
. Lights can be individually toggled in the shader by flipping the last bit oflightIndex
. As of now, all lights are turned on and off at the same time of day, but with some additional work, a staggered effect could be produced.Reflections
Materials can be configured to be reflective. Reflective materials will reflect both the skybox, and the world geometry, depending on configuration options. If world geometry reflection is enabled, cubemaps will be rendered at the height of the viewer camera in each reflective object, and those cubemaps used to calculate the reflection of the world geometry on the surface.
Another experimental feature, planar reflections, is also possible for flat objects on the XZ plane with height Y = 0 (primarily water sources). The camera is reflected across the Y = 0 plane, and the view from the other side is rendered to a texture. That texture is then used to calculate the true reflections off the planar surface. This feature may cause significant performance impacts as the scene has to be rendered twice.
Config Parameters
showSkyReflections (default false)
-- Enables reflections of the skybox off reflective surfaces.geomReflections (default "cubemap")
-- Controls how reflections of world geometry are calculated. As of now the only options arenone
andcubemap
.none
disables world geometry reflections, andcubemap
renders a cubemap of the world from inside each reflective object to calculate reflections from.showGroundReflections (default false)
-- Enables planar reflections where possible.material_NAME_reflectance (default 0.0)
-- Sets how much of the material remains visible on a reflective surface.1.0
means the surfaces reflects perfectly and none of the original material is visible,0.0
means the surface is not reflective.material_NAME_textureN_reflmap (default false)
-- Indicates that a texture is a reflectance map. Places where the texture is black will be reflective, while white indicates no reflection.Known Bugs
Reflective objects are not reflective if geometry reflection is enabledReflections are not rendered when SSAO is enabledShadows do not move to reflect position of the sunEnabling cubemap geometry reflections causes the rendered scene to shrink to the size of the cubemap