Commit graph

3578 commits

Author SHA1 Message Date
Azaezel
1d36cf05b0 cleanups and perf: only need to subtract the alpha post-blending, not pre and post, contribution>1 shouldn't happen, so max(result,0) suffices, and no need for a for-all-probes-loop if we already know ya only got one probe hitting the pixel under examination. 2019-03-26 12:41:20 -05:00
Azaezel
5703618dc0 shift bbminmax to relative when sent to the gpu so folks can stick to realworld values 2019-03-26 06:48:56 -05:00
Azaezel
903efc7cfd Merge branch 'PBR_ProbeArrayWIP' of https://github.com/Areloch/Torque3D into PBR_ProbeArrayWIP
# Conflicts:
#	Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl
2019-03-26 01:06:59 -05:00
Areloch
e2b194182c Undid debug work, shifted logic over entirely to utilize the updateTexture methods. Refactored probe init'ing so they'll load correctly without nudging, properly sequestered skylights from the probe array and updated the shader to contain az's changes as well as skylight and probe array changes. 2019-03-25 23:17:53 -05:00
Azaezel
fdb4c5c964 Merge branch 'PBR_ProbeArrayWIP' of https://github.com/Areloch/Torque3D into PBR_ProbeArrayWIP
# Conflicts:
#	Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl
2019-03-25 01:21:00 -05:00
Areloch
1627cbabe6 ongoing WIP to sort out init'ing issues as well as correcting values so the probes actually correctly update data into the arrays
Additional sanity checks on the updateTexture calls added by timmy
2019-03-25 00:06:08 -05:00
Azaezel
f01c41a899 cleanups. don't really want to be multiplying the color itsself by contribution ammount 2019-03-24 19:28:51 -05:00
Azaezel
2c1a786e23 Revert "refactor: shift probe to probe blending logic itsself on out to it's own method to make thatg end easeier to deal with in isolation. (though does still depend on a bit of upstream calculation in the form of tracking how many probes hit a given pixel, and 'how hard' as it wetre from the attenuation calcs,"
This reverts commit 466914e97f.
2019-03-24 18:53:02 -05:00
Azaezel
52e946405b do not need to account for blenFacSum for output. it's a straight overwrite of results. 2019-03-24 18:41:02 -05:00
Azaezel
3af1129e75 refactor: shift probe to probe blending logic itsself on out to it's own method to make thatg end easeier to deal with in isolation. (though does still depend on a bit of upstream calculation in the form of tracking how many probes hit a given pixel, and 'how hard' as it wetre from the attenuation calcs, 2019-03-24 18:38:34 -05:00
Azaezel
de8b267780 was improperly accounting for attenaution. needs a reversal for atten = 0 to be full unblended application fo a given projection. 2019-03-24 18:38:25 -05:00
Azaezel
b935b7b19f from tim: no need for mip for the diffuse contribution. the prefilter handles that 2019-03-24 18:38:14 -05:00
Areloch
26471aaa77 WIP of timmy's changes merged in. Not properly initializing the probes/array slots just yet. 2019-03-24 18:18:44 -05:00
Azaezel
ba8948a5b1 hook up attenuation value. todo: sort networkjing properly 2019-03-21 23:47:01 -05:00
Azaezel
003c79132e simplification 2019-03-20 08:38:48 -05:00
Azaezel
df6b7f3351 put probe.boxmax/min code back as it was prior to merge. still having that /4 oddness. 2019-03-20 07:38:14 -05:00
Azaezel
306bfb4718 defineBoxSpaceInfluence drastically simplified. please hook probeattenuationvalue up to the proper probe inputs. also need to peg down exactly why we needed to feed a baseVal = 0.25 instead of a proper 1.0 unit to avoid the thing casting beyond the defined bounds. 2019-03-19 11:28:52 -05:00
Azaezel
3aac1421cc getDistBoxToPoint max, not length nets us hard edges instea of drounded, float3 extents = probe.boxMax; isn't neded, can use unit space for that and put box min/max back to controlling the reflected boxe's scale. divnull safety 2019-03-18 17:07:43 -05:00
Azaezel
04a6130df8 sync correction 2019-03-18 04:09:34 -05:00
Azaezel
c615d3e822 git being a butt with language files. again. 2019-03-18 03:41:44 -05:00
Azaezel
caf73ea84f Merge branch 'PBR_ProbeArrayWIP' of https://github.com/Areloch/Torque3D into PBR_ProbeArrayWIP
# Conflicts:
#	Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl
2019-03-18 00:18:49 -05:00
Areloch
2bf67f7fa5 Corrections to make it use the correct transform, as well as passing along the scale as our extents in the bbMax.
Adjusts the box influence logic to try the bsf method.
2019-03-18 00:14:06 -05:00
Azaezel
edcdd21379 suggested alterations to the probe.worldToLocal math feeding and usage (and a divnull safety for attenuation) 2019-03-17 20:14:58 -05:00
Azaezel
3afbdff871 changes a bit of the probecount logic to be based on probehit aka, how many probes specifically are hitting a given pixel. allows for attenuation-blended probe to probe, and full-override probe to skylight. 2019-03-08 06:34:51 -06:00
Azaezel
d83dac0bcf reflection scalefix 2019-03-05 00:41:00 -06:00
Azaezel
0df6189ce4 debug crashfix. append .xyz so it knows 'yes, i do mean float4 to float3' 2019-03-05 00:28:34 -06:00
Azaezel
c75fd02bb5 boxproject converted to obb. TODO: convert defineBoxSpaceInfluence to obb as well by getting rid of that length(boxMaxLS - boxMinLS); in favor of a 3D scale calc set. 2019-03-04 23:29:23 -06:00
Areloch
ebdae5f4c1 Corrected yorks chapel materials + added to the main test level 2019-03-04 17:57:53 -06:00
Azaezel
6b261db84c lightmap testbed 2019-03-04 16:48:28 -06:00
Azaezel
9f2f8d1d8f 1) use surface.R(reflection vector), not surface.N(worldspace normal) so we have pov based variation on skylight reflections.
2) use lerp based on the sum contribution of probes for a given pixel as calculated by all non-skylight probes. vs the skylight probe result. (math is currently still wrong, or we wouldn't be needing to use a saturate to get skylights showing)
TODO: find out where the attenuation went for a smooth blend. probably the same thing killing unsaturated skylight display..
2019-03-03 17:27:26 -06:00
Azaezel
479959a35b slimmed down level save 2019-03-03 15:59:02 -06:00
Areloch
dbd0c971d3 Broke the functions out from the probeData struct
Moved ibl stuff back out of lighting.hlsl into probeArray shader for now.
2019-03-03 15:47:28 -06:00
Azaezel
907bac02e0 mergefix 2019-03-03 14:22:28 -06:00
Azaezel
6a7d046a19 Merge branch 'PBR_ProbeArrayWIP' of https://github.com/Areloch/Torque3D into PBR_ProbeArrayWIP
# Conflicts:
#	Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl
2019-03-03 11:54:24 -06:00
Areloch
70d85d2241 Begun hook-in of skylight into array
Reworked the reflection reference offset/scale behavior to re-integrate into the editor interface via button(and work)
Hid irrelevent fields from given probe types.
Filter out editPosOffset and bake button fields from being saved to avoid weird loading behavior
2019-03-02 04:48:07 -06:00
Azaezel
edccd2301c EXPERIMENTATION: for paranoias sake, go ahead and normalize the reflection vector input for boxproject, throw out any out of range contributions (HACK ALERT!) and, what would appear to be the most corrective, reverse the blendfactor math. 2019-02-25 12:37:05 -06:00
Azaezel
89fb367f6a shift the wip code back out of lighting.hlsl till were sure of it, and while we're at it, shove the probe methods into the probe class to more easily differentiate between blend-val and raw contribution factors 2019-02-25 02:39:00 -06:00
Areloch
df8864659a Shift back to the seb methodology, but keep the probe struct for cleaner and easier to read code 2019-02-25 01:08:23 -06:00
Areloch
2903aaeea0 WIP of the rewrite of blend/projection to follow BSF's math approach. 2019-02-22 08:12:03 -06:00
Azaezel
c1bf59bf07 destructor code+ removed a crash-causing redundancy in onRemove 2019-02-20 16:59:58 -06:00
Azaezel
727dbbfd8d rolled in more of https://github.com/GarageGames/Torque3D/pull/2315 + set the mProbeShapeType(s) for the two derivative classes 2019-02-19 16:34:30 -06:00
Azaezel
0f5fe527dd sample surface roughness for diffuse return. 0 means sharpest possible result 2019-02-19 14:37:44 -06:00
Azaezel
bdcb1aaea6 no need to z flip the diffuse box dx side. may need to gl side 2019-02-19 14:17:52 -06:00
Azaezel
cf50803e72 swap over to wireframe, plus a few misc cleanups 2019-02-19 13:58:29 -06:00
Azaezel
309d518249 scale reflection properly 2019-02-19 09:38:34 -06:00
Azaezel
742447178b set blendfactor to blendval when only one probe. 2019-02-19 09:24:38 -06:00
Azaezel
5bce2d0904 seperated offset from position (we pass the net to the shader for use in the reflection box), and added a scalar (also only used in the reflection box). maked both as probeRef to denote reflection parameters. 2019-02-19 08:58:02 -06:00
Azaezel
e4ddfcfb01 hook editor displays back up 2019-02-19 08:55:55 -06:00
Azaezel
c359bf622b won't be needing the flipflop after yesterdays alterations unless we also need to do up a blur pass, at which point the name wouldn't be apropriate anyway. 2019-02-18 17:11:04 -06:00
Azaezel
93377ebc16 seperated out the sum of the total weights form the sum of the factored weights 2019-02-18 16:13:17 -06:00