Merge remote-tracking branch 'upstream/main'
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
|
||||
|
||||
|
||||
@ -669,8 +669,10 @@ class Inc {
|
||||
#end
|
||||
|
||||
#if rp_ssrs
|
||||
#if kha_opengl
|
||||
path.bindTarget("_main", "gbufferD");
|
||||
#end
|
||||
#end
|
||||
|
||||
path.drawMeshes("translucent");
|
||||
|
||||
@ -1314,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();
|
||||
@ -1418,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";
|
||||
|
||||
@ -116,6 +116,11 @@ class Postprocess {
|
||||
1 //0: Exposure
|
||||
];
|
||||
|
||||
public static var scene_color_uniforms = [
|
||||
0.0, //0: Scene Exposure
|
||||
1.0 //1: Scene Gamma
|
||||
];
|
||||
|
||||
public static var auto_exposure_uniforms = [
|
||||
1, //0: Auto Exposure Strength
|
||||
1 //1: Auto Exposure Speed
|
||||
@ -406,6 +411,10 @@ class Postprocess {
|
||||
v.x = auto_focus[0];
|
||||
v.y = auto_focus[1];
|
||||
v.z = auto_focus[2];
|
||||
case "_PPComp20":
|
||||
v = iron.object.Uniforms.helpVec;
|
||||
v.x = scene_color_uniforms[0]; // Scene Exposure
|
||||
v.y = scene_color_uniforms[1]; // Scene Gamma
|
||||
}
|
||||
|
||||
return v;
|
||||
|
||||
@ -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