Commit graph

29 commits

Author SHA1 Message Date
Azaezel
03690e2169 vectorlight ssao macro fix, z=w trick gl side for cloudlayer variants 2018-12-09 19:48:18 -06:00
Azaezel
cab68a6f23 vectorlight conversion cleanups, pointlight port 2018-12-09 15:26:14 -06:00
Azaezel
7160882bd2 gl conversion WIP. general notes: mSamplerNames[#]/samplerNames[#] entry explicitly corresponds to the order of definition GL side.
shifted the colorbuffer slot over to S1 in keeping with the gbuffer layout for consistency
completed converts: brdf, lighting, torque.
nonvisually verified convert: vectorlight
noncompiling due to tripping on deferredUncondition: reflectionprobe
2018-12-08 01:41:06 -06:00
Areloch
4efcb567b0 Getting the GL side up-to-date to match. 2018-10-06 17:50:15 -05:00
Areloch
2be32ad737 Implementation of reflection and skylight probes.
Moves lighting math to the diffuse/specular two-channel logic.
2018-09-16 22:15:07 -05:00
Areloch
ef5e3a5271 Core implementation of Physical Based Rendering. 2018-09-15 20:19:57 -05:00
rextimmy
d0b9eeaa92 Intel GL Fix 2017-07-05 14:45:00 +10:00
Areloch
90e7976496 Does the prepass->deferred rename for the full template as well to make it play nice while we prep for the swap over to the BaseGame template. 2017-05-08 18:33:14 -05:00
Azaezel
0049678c25 [workaround] pinches parallax steps so the 0-1 range has minimal artifacting 2016-12-06 23:41:28 -06:00
RexTimmy
dd64004eaf MacOS platform support. 2016-09-28 11:09:48 +10:00
Azaezel
07224ecd97 vec3 variants for toLinear and toGamma 2016-08-09 14:05:54 -05:00
Azaezel
d79b9a2988 removes w=z trick (was causing fisheye, effectively) 2016-05-18 06:38:13 -05:00
Azaezel
1c854b6009 opengl crashfix pow(x,y) needed to be passed matching vartypes. 2016-02-29 04:17:42 -06:00
Azaezel
8c5810adad The final step (barring any overlooked missing bits, requested refactors, and of course, rolling in dependencies already submitted as PRs) consists of:
renderPrePassMgr.cpp related:
A) shifting .addFeature( MFT_XYZ); calls from ProcessedShaderMaterial::_determineFeatures to ProcessedPrePassMaterial::_determineFeatures
B) mimicking the "// set the XXX if different" entries from RenderMeshMgr::render in RenderPrePassMgr::render
C) fleshing out ProcessedPrePassMaterial::getNumStages() so that it shares a 1:1 correlation with ProcessedShaderMaterial::getNumStages()
D) causing inline void Swizzle<T, mapLength>::ToBuffer( void *destination, const void *source, const dsize_t size )  to silently fail rather than fatally assert if a source or destination buffer is not yet ready to be filled. (support for #customTarget scripted render targets)

Reflections:
A) removing reflectRenderState.disableAdvancedLightingBins(true); entries. this would otherwise early out from prepass and provide no color data whatsoever.
B) removing the fd.features.addFeature( MFT_ForwardShading ); entry forcing all materials to be forward lit when reflected.
C) 2 things best described bluntly as working hacks:
C1) when reflected, a scattersky is rotated PI along it's z then x axis in order to draw properly.
C2) along similar lines, in terraincellmaterial, we shut off culling if it's a prepass material.

Skies: scattersky is given a pair of rotations for reflection purposes, all sky objects are given a z value for depth testing.
2016-02-16 02:50:49 -06:00
Azaezel
5ed06fff9d Script:
by and large, Opengl branch compatibility alterations, though do again note the inclusion of
   sampler["lightBuffer"] = "#lightinfo";
   sampler["colorBuffer"] = "#color";
   sampler["matInfoBuffer"] = "#matinfo";

and
   samplerNames[5] = "$lightBuffer";
   samplerNames[6] = "$colorBuffer";
   samplerNames[7] = "$matInfoBuffer";
entries. This is where the engine knows to pass along a given rendertarget for input into a predefined shader, as opposed to the prior phase's output to targets within procedural ones.

Shader:
the XXXLight.hlsl/glsls account for alterations in inputs, check for emissive and translucency, apply Felix's Normal Mapped Ambient. and pass the results along to  AL_DeferredOutput for final computation before returning the result.
the lighting.hlsl/.glsl consissts of removal of the overridden engine-specific phong specular variant, and defines the  AL_DeferredOutput  method, which equates to the previously used pixspecular feature defined along the lines of
http://books.google.com/books?id=GY-AAwAAQBAJ&pg=PA112&lpg=PA112&dq=blinn+phong+specular+gloss+hlsl&source=bl&ots=q9SKJkmWHB&sig=uLIHX10Zul0X0LL2ehSMq7IFBIM&hl=en&sa=X&ei=DbcsVPeWEdW1yASDy4LYDw&ved=0CB4Q6AEwAA#v=onepage&q=gloss%20&f=false

also includes visualizers

Long term impact: This area, along with the \game\shaders\common\lighting\advanced\lightingUtils.hlsl/.glsl pair will be where we plug in properly attenuated Cook-Torrence later, presuming the impact is not to hefty.
2016-02-16 02:29:54 -06:00
Azaezel
ce2964d2d0 diffuse/albedo texture linearization
http://http.developer.nvidia.com/GPUGems3/gpugems3_ch24.html
2015-11-11 13:52:46 -06:00
rextimmy
246785a8bf Removed unused vertex formats from ScatterSky 2015-10-16 21:30:39 +10:00
Areloch
5ee096de20 Added in explicit setting to vec2 in the shader functions per Az's suggestion, to avoid GLSL problems 2015-08-29 12:41:35 -05:00
Areloch
71c19a6151 Companion PR to #719
Adds the OGL side. redoing it to make sure the PR history is clean.
2015-08-28 00:27:08 -05:00
LuisAntonRebollo
3ad04d050c Fix shadows on Basic Lighting. 2015-02-15 22:26:05 +01:00
Luis Anton Rebollo
2d3f711443 Merge pull request #1128 from Azaezel/cloudlayer
cloudlayer hdr packing
2015-02-07 20:50:29 +01:00
Anis
9e090a2ef7 Update lighting.glsl 2015-01-28 23:36:43 +01:00
Azaezel
86770cb3c1 cloudlayer hdr packing
fixes for #1126
2015-01-25 17:56:17 -06:00
LuisAntonRebollo
ed0febea39 Clean GLSL fragment shader out. 2014-11-30 23:00:18 +01:00
LuisAntonRebollo
4409a12af6 Fix GLSL out fragment shader color. 2014-11-30 05:32:40 +01:00
LuisAntonRebollo
5bcd1458c4 Templates changes for OpenGL shaders. 2014-11-08 20:19:50 +01:00
LuisAntonRebollo
6aea37b407 Changes to GLSL files for OpenGL 2014-04-13 19:55:45 +02:00
thecelloman
b4ea1123dc Remove Interior Object format (DIF) 2013-04-05 12:39:26 -04:00
DavidWyand-GG
f439dc8dcd Full Template for ticket #1 2012-09-19 11:54:25 -04:00