forked from LeenkxTeam/LNXSDK
Forward / Mobile / Solid
This commit is contained in:
@ -90,8 +90,16 @@ class LightObject extends Object {
|
||||
|
||||
#if lnx_spot
|
||||
if (data.raw.type == "spot"){
|
||||
this.size = data.raw.spot_size;
|
||||
this.blend = data.raw.spot_blend;
|
||||
this.size = 0.0;
|
||||
this.blend = 0.0;
|
||||
if (data.raw.spot_size != null) {
|
||||
var s: kha.FastFloat = data.raw.spot_size;
|
||||
this.size = s;
|
||||
}
|
||||
if (data.raw.spot_blend != null) {
|
||||
var b: kha.FastFloat = data.raw.spot_blend;
|
||||
this.blend = b;
|
||||
}
|
||||
}
|
||||
#end
|
||||
|
||||
|
||||
@ -1316,7 +1316,11 @@ class ShadowMapAtlas {
|
||||
|
||||
function new(light: LightObject, transparent: Bool) {
|
||||
|
||||
#if lnx_shadowmap_atlas_single_map
|
||||
var maxTileSize = Std.int(Math.max(Inc.getCubeSize(), Inc.getCascadeSize()));
|
||||
#else
|
||||
var maxTileSize = shadowMapAtlasSize(light);
|
||||
#end
|
||||
this.target = shadowMapAtlasName(light.data.raw.type, transparent);
|
||||
this.sizew = this.sizeh = this.baseTileSizeConst = maxTileSize;
|
||||
this.depth = getSubdivisions();
|
||||
@ -1420,8 +1424,8 @@ class ShadowMapAtlas {
|
||||
|
||||
public static inline function shadowMapAtlasName(type: String, transparent: Bool): String {
|
||||
#if lnx_shadowmap_atlas_single_map
|
||||
return "shadowMapAtlas";
|
||||
#else
|
||||
return transparent ? "shadowMapAtlasTransparent" : "shadowMapAtlas";
|
||||
#else
|
||||
switch (type) {
|
||||
case "point":
|
||||
return transparent ? "shadowMapAtlasPointTransparent" : "shadowMapAtlasPoint";
|
||||
|
||||
@ -560,6 +560,7 @@ class RenderPathDeferred {
|
||||
@:access(iron.RenderPath)
|
||||
public static function commands() {
|
||||
path.setTarget("gbuffer0"); // Only clear gbuffer0
|
||||
//path.setTarget("gbuffer0", ["gbuffer1"]);
|
||||
#if (rp_background == "Clear")
|
||||
{
|
||||
path.clearTarget(-1, 1.0);
|
||||
@ -649,7 +650,11 @@ class RenderPathDeferred {
|
||||
{
|
||||
if (leenkx.data.Config.raw.rp_ssao != false) {
|
||||
path.setTarget("singlea");
|
||||
#if rp_ssao_half
|
||||
path.bindTarget("half", "gbufferD");
|
||||
#else
|
||||
path.bindTarget("_main", "gbufferD");
|
||||
#end
|
||||
path.bindTarget("gbuffer0", "gbuffer0");
|
||||
path.drawShader("shader_datas/ssao_pass/ssao_pass");
|
||||
|
||||
@ -670,7 +675,11 @@ class RenderPathDeferred {
|
||||
{
|
||||
if (leenkx.data.Config.raw.rp_ssgi != false) {
|
||||
path.setTarget("ssgi_a");
|
||||
#if rp_ssgi_half
|
||||
path.bindTarget("half", "gbufferD");
|
||||
#else
|
||||
path.bindTarget("_main", "gbufferD");
|
||||
#end
|
||||
path.bindTarget("gbuffer0", "gbuffer0");
|
||||
path.bindTarget("gbuffer1", "gbuffer1");
|
||||
#if rp_gbuffer_emission
|
||||
@ -684,13 +693,21 @@ class RenderPathDeferred {
|
||||
path.setTarget("ssgi_b");
|
||||
path.bindTarget("ssgi_a", "tex");
|
||||
path.bindTarget("gbuffer0", "gbuffer0");
|
||||
#if rp_ssgi_half
|
||||
path.bindTarget("half", "gbufferD");
|
||||
#else
|
||||
path.bindTarget("_main", "gbufferD");
|
||||
#end
|
||||
path.drawShader("shader_datas/ssgi_blur_pass/ssgi_blur_pass_x");
|
||||
|
||||
path.setTarget("ssgi_a");
|
||||
path.bindTarget("ssgi_b", "tex");
|
||||
path.bindTarget("gbuffer0", "gbuffer0");
|
||||
#if rp_ssgi_half
|
||||
path.bindTarget("half", "gbufferD");
|
||||
#else
|
||||
path.bindTarget("_main", "gbufferD");
|
||||
#end
|
||||
path.drawShader("shader_datas/ssgi_blur_pass/ssgi_blur_pass_y");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user