Commit Graph

159 Commits

Author SHA1 Message Date
Lasse Öörni
66bc72a76f In ForwardDepth renderpath, clear depth two times as on OpenGL it can't be guaranteed that the proper rendering pass depth buffer is same as in the linear depth pass. Closes #1073. 2015-12-07 11:00:47 +02:00
Xavier Maupeu
9b48314d99 update glsl lighting 2015-12-05 17:12:28 +01:00
Xavier Maupeu
e636d44df9 vsm implementaion for hlsl shaders 2015-12-05 15:45:07 +01:00
Xavier Maupeu
45aa12c496 VSM shadow map can be blurred 2015-12-05 13:26:38 +01:00
Xavier Maupeu
2ac35e8a06 update lighting shader for vsm 2015-12-01 16:58:31 +01:00
Xavier Maupeu
78a85ff2c6 simple VSM is working 2015-11-29 11:26:36 +01:00
Xavier Maupeu
34c0d94208 update shader for vsm 2015-11-26 13:42:20 +01:00
Xavier Maupeu
4e41906157 first modifications in order to integrate VSM shadow 2015-11-26 10:13:27 +01:00
Lasse Öörni
d13addbbd7 Fix Vegetation shadow shader for D3D11. Ensure LitSolid changes are ported to Vegetation shader. Put wind related parameters to a custom constant buffer on D3D11. Closes #1052. 2015-11-23 13:49:00 +02:00
Lasse Öörni
e1cae7077f Ensure matching interpolator order with point lights, critical on D3D11. Closes #1048. 2015-11-21 12:36:57 +02:00
Lasse Öörni
e6c75eb229 Added TRANSLUCENT option to lighting, which takes absolute value of NdotL (only works in forward lighting.) Add example translucent techniques. Closes #1016. 2015-11-13 17:21:13 +02:00
Lasse Öörni
92a080d68b Remove the GLES skybox fix as it was doing more harm than good. Closes #1011. 2015-11-04 22:11:59 +02:00
Lasse Öörni
6e118d237f Unify naming of rendertargets between the Bloom & Blur postprocesses. 2015-11-02 01:41:14 +02:00
Jukka Jylänki
fc0d427557 Add support for GPU hardware instancing on Emscripten. In WebGL 1 it is exposed by the ANGLE_instanced_arrays ( https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/ ) extension, and in WebGL 2, it is enabled in core. 2015-10-09 18:58:42 +03:00
Lasse Öörni
1d6a980136 Prevent attempting to compile the ColorCorrection function (uses unsupported sampler3D) on GLES. 2015-09-23 10:55:10 +03:00
Lasse Öörni
f59b6334ff Fixed Blur.hlsl from MonkeyFirst. Closes #899. 2015-09-17 12:21:52 +03:00
Lasse Öörni
70b871ebfa Code convention edits. Removed unused variable. Make debug icons use Basic shader for no fog. Do not render debug icons to camera preview viewport. Fixed Basic shader with VERTEXCOLOR define on D3D11. 2015-08-14 23:09:53 +03:00
Lasse Öörni
a626021d95 Fixes for VS texture fetch on D3D11. 2015-08-06 22:28:05 +03:00
Lasse Öörni
6f8ed55c0a Fix the Depth shader on D3D11. Simplify View code to determine whether a substitute RT for the backbuffer is needed. Fix having to render the hardware depth stencil twice in the ForwardDepth renderpath. 2015-07-14 19:32:58 +03:00
Mike3D
84cb5abf0b Increased precision qualifiers to medium for better compatibility across mobile devices. Closes #763. 2015-07-04 12:39:30 +02:00
Lasse Öörni
368cd56955 Fix FXAA3 shader on OpenGL 3. Add non-deprecated aliases for texture2DLod in Samplers.glsl. Thanks to Gunnar Kriik. 2015-06-14 01:55:55 +03:00
Lasse Öörni
b6889b68df In DeferredHWDepth renderpath, clear albedo rendertarget explicitly to prevent ghosting bugs from previous frames in case stencil is not available. 2015-05-10 15:09:42 +03:00
Lasse Öörni
2a34d35dec Added missing vertex color variation to the LitSolid shaders. 2015-05-08 12:41:59 +03:00
Lasse Öörni
9c226e2c3c Added pure diffuse vertexcolor & notexture vertexcolor techniques. 2015-05-08 11:03:44 +03:00
Lasse Öörni
f4b5ead164 On D3D11 & OpenGL3, convert luminance & luminance-alpha textures to RGBA on upload. Revert RampGenerator & Spot/SpotWide texture changes to use RGB format. Closes #718. 2015-05-06 17:23:10 +03:00
Lasse Öörni
c9bb360bf4 Fix AutoExposure shader on D3D11. Closes #714. 2015-05-04 21:26:52 +03:00
Lasse Öörni
aa65cedefd Add NOUV define to LitParticle, LitSolid & Unlit HLSL shaders when used as untextured, to prevent vertex layout creation problem on D3D11 when model has no UVs. Remove texcoords from the editor grid as they're no longer necessary. Closes #712. 2015-04-29 20:09:18 +03:00
Lasse Öörni
b26b2c470b Fix Text shader non-SDF mode on OpenGL 3. Closes #685. 2015-04-01 21:33:48 +03:00
Lasse Öörni
2961166acb Graphics code cleanup. Remove the GraphicsFeatures event, as now the features can not change during runtime. Move all OpenGL extensions checks to CheckFeatureSupport(). Fix an AMD GLSL compilation bug, which caused buggy 4-sample shadows. 2015-03-31 23:06:09 +03:00
Lasse Öörni
73b0a8221a Fix illegal use of texture3D on OpenGL 3. Closes #683. 2015-03-25 14:18:33 +02:00
Lasse Öörni
b8c7c59eca Configure amount of allowed bones for hardware skinning based on the rendering API. Allow 128 bones on Direct3D 11 & OpenGL 3. Add -mb (maxbones) parameter to AssetImporter & OgreImporter. When using OpenGL 3, allow deferred rendering to use different MRT formats without forcing an RGBA substitute rendertarget. 2015-03-21 23:22:08 +02:00
Lasse Öörni
81e6647b60 Clean up OpenGL Graphics class code. Use core functions for instancing on OpenGL 3. Do not enable/disable texture targets on OpenGL 3. Removed the framebuffer aging mechanism; instead framebuffers are cleaned up on context loss (resolution change.) Disable OpenGL constant buffer use by default (from Uniforms.glsl) as they were found to be slower in practice. 2015-03-21 01:56:38 +02:00
Lasse Öörni
040b6263f5 Fix crash with null constant buffer slots. 2015-03-18 20:54:21 +02:00
Lasse Öörni
2cefd437de Check if shader uses uniforms outside buffer and invalidate all parameter groups in that case, when switching shaders. Add define in Uniforms.glsl which allows to disable constant buffers on OpenGL 3, as using them may actually be slower. 2015-03-18 10:27:46 +02:00
Lasse Öörni
0e5a05afc7 OpenGL 3 constant buffer support. 2015-03-18 02:40:28 +02:00
Lasse Öörni
992cbcc73f Fix GLSL deprecation warnings. OpenGL 3 clip plane support. Use R32F format on OpenGL 3 for deferred linear depth instead of manual RGB encoding & decoding. 2015-03-17 01:01:11 +02:00
Lasse Öörni
07a75dc37b Initial OpenGL 3.2 support. 2015-03-16 23:36:35 +02:00
Lasse Öörni
3759570319 Remove rrr swizzle from lighting shaders to allow the spotlight to be colored. Convert the default spot textures to RGB color to avoid sampling only the R channel on D3D11. 2015-03-12 21:25:42 +02:00
Lasse Öörni
4e308f21c3 3D textures on D3D11. Fixed the ColorCorrection shader. 2015-03-08 20:16:15 +02:00
Lasse Öörni
72a153f1a3 Fix Tonemap shader for D3D11. 2015-03-08 16:23:23 +02:00
Lasse Öörni
871fc3abea Fix erroneous UI rendering after compiling the Text shader, by listing texcoord interpolator before color. 2015-03-08 16:15:17 +02:00
Lasse Öörni
e106f1b389 D3D11 clip plane support. Check that multisample level is supported. Various shader fixes. 2015-03-08 02:57:08 +02:00
Lasse Öörni
b9278e0a94 Implement partial rendertarget clear on D3D11. Implement Graphics::ResolveToTexture() on D3D11. Fix most post-process shaders on D3D11. Readded the custom constant buffer slot. Update documentation. 2015-03-07 23:02:31 +02:00
Lasse Öörni
6112220b16 Cube maps, point light shadows & deferred / light prepass rendering on D3D11. 2015-03-05 23:32:16 +02:00
Lasse Öörni
8b49a21587 Fix shadow alpha mask shader. 2015-03-05 00:42:19 +02:00
Lasse Öörni
4542e38b73 Fix terrain shader on D3D11. 2015-03-05 00:32:25 +02:00
Lasse Öörni
17cf79ab82 D3D11 rendertarget and initial shadow (directional & spot light) support. Fix creating too many rasterizer states for depth bias by quantizing. Fix crash on exit if states failed to create. 2015-03-05 00:21:21 +02:00
Lasse Öörni
e919935abd Merge back D3D9 & D3D11 shaders using macros. Removed the "custom" constant buffer slot; rather allow to prevent the default material CB from being defined. 2015-03-02 03:39:21 +02:00
Lasse Öörni
73c847fbeb Separate D3D11 shaders as the compatibility mode did not sample eg. the light ramp texture correctly. 2015-03-01 19:14:56 +02:00
Lasse Öörni
d7a16d6713 Fix potential negative specular lighting. Fix recreating the sampler state when a texture has been reloaded. 2015-03-01 14:08:01 +02:00
Lasse Öörni
a1d1f08190 Split uniforms into constant buffers on D3D11. 2015-02-28 21:09:41 +02:00
Lasse Öörni
88080dad31 Remove Shader Model 2 mode & instancing without stream offset (D3D9) as they are hard to test. Added Graphics::GetApiName() function. 2015-02-21 20:53:12 +02:00
Lasse Öörni
56f64c60b9 Texture unit refactoring. On desktop ensure continuous range of 8 material texture units, while mobile has 5. Material can define a volume (3D) texture in the volume unit (desktop only.) 2015-02-15 15:33:16 +02:00
Lasse Öörni
6be3b14855 Merge branch 'master' into render-refactor 2015-02-15 12:59:09 +02:00
Lasse Öörni
3f2f88441d Enable cascaded shadows on Emscripten. 2015-02-14 23:30:22 +02:00
Chris Friesen
57eeeb84b1 Fix terrain shader in chrome by explicitly setting precision 2015-02-13 21:31:59 +08:00
Lasse Öörni
b96f47db61 Change order of matrix multiplies in GLSL to eliminate need to transpose matrix uniforms and make the order consistent with skinned & instanced rendering. 2015-02-12 00:05:32 +02:00
aster2013
392efab9d7 Change GetIntensity, make it same to Color::Luma().[ci skip] 2015-02-04 13:26:41 +08:00
Yao Wei Tjong 姚伟忠
05a8b79fd2 Rename "Bin" subdir to "bin". 2015-01-18 21:31:13 +08:00