forked from LeenkxTeam/LNXSDK
		
	Merge pull request 't3du [ Repe ] + Moises - Tonemaps / Debugdrawer / Compositor Fixes' (#64) from Onek8/LNXSDK:main into main
Reviewed-on: LeenkxTeam/LNXSDK#64
This commit is contained in:
		@ -508,9 +508,7 @@ fragColor.rgb = min(fragColor.rgb, 65504 * 0.5);
 | 
			
		||||
			fragColor.rgb = pow(fragColor.rgb, vec3(1.0 / 2.2)); // To gamma
 | 
			
		||||
		} else if (PPComp4.x == 10){
 | 
			
		||||
			fragColor.rgb = tonemapAgXFull(fragColor.rgb);
 | 
			
		||||
		} else {
 | 
			
		||||
			fragColor.rgb = vec3(0,1,0); //ERROR
 | 
			
		||||
		}
 | 
			
		||||
		} //else { fragColor.rgb = vec3(0,1,0); //ERROR}
 | 
			
		||||
	#endif
 | 
			
		||||
 | 
			
		||||
#else
 | 
			
		||||
 | 
			
		||||
@ -45,7 +45,7 @@ class DebugDrawHelper {
 | 
			
		||||
 | 
			
		||||
		iron.App.notifyOnRender2D(onRender);
 | 
			
		||||
		if (debugDrawMode & DrawRayCast != 0) {
 | 
			
		||||
			iron.App.notifyOnUpdate(function () {
 | 
			
		||||
			iron.App.notifyOnFixedUpdate(function () {
 | 
			
		||||
				rayCasts.resize(0);
 | 
			
		||||
			});
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
@ -434,8 +434,8 @@ class PhysicsWorld extends Trait {
 | 
			
		||||
				from: from,
 | 
			
		||||
				to: to,
 | 
			
		||||
				hasHit: rc.hasHit(),
 | 
			
		||||
				hitPoint: hitPointWorld,
 | 
			
		||||
				hitNormal: hitNormalWorld
 | 
			
		||||
				hitPoint: hitPointWorld.clone(),
 | 
			
		||||
				hitNormal: hitNormalWorld.clone()
 | 
			
		||||
			});
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -16,7 +16,7 @@ class CameraGetNode(LnxLogicTreeNode):
 | 
			
		||||
        self.add_output('LnxFloatSocket', 'DOF Distance')#6
 | 
			
		||||
        self.add_output('LnxFloatSocket', 'DOF Length')#7
 | 
			
		||||
        self.add_output('LnxFloatSocket', 'DOF F-Stop')#8
 | 
			
		||||
        self.add_output('LnxBoolSocket', 'Tonemapping')#9
 | 
			
		||||
        self.add_output('LnxIntSocket', 'Tonemapping')#9
 | 
			
		||||
        self.add_output('LnxFloatSocket', 'Distort')#10
 | 
			
		||||
        self.add_output('LnxFloatSocket', 'Film Grain')#11
 | 
			
		||||
        self.add_output('LnxFloatSocket', 'Sharpen')#12
 | 
			
		||||
 | 
			
		||||
@ -16,6 +16,10 @@ class ChromaticAberrationSetNode(LnxLogicTreeNode):
 | 
			
		||||
 | 
			
		||||
        self.add_output('LnxNodeSocketAction', 'Out')
 | 
			
		||||
 | 
			
		||||
    def draw_buttons(self, context, layout):
 | 
			
		||||
        layout.label(text="Type 0: Simple")
 | 
			
		||||
        layout.label(text="Type 1: Spectral")
 | 
			
		||||
 | 
			
		||||
    def get_replacement_node(self, node_tree: bpy.types.NodeTree):
 | 
			
		||||
        if self.lnx_version not in (0, 1):
 | 
			
		||||
            raise LookupError()
 | 
			
		||||
 | 
			
		||||
@ -4,7 +4,7 @@ class CameraSetNode(LnxLogicTreeNode):
 | 
			
		||||
    """Set the post-processing effects of a camera."""
 | 
			
		||||
    bl_idname = 'LNCameraSetNode'
 | 
			
		||||
    bl_label = 'Set Camera Post Process'
 | 
			
		||||
    lnx_version = 5
 | 
			
		||||
    lnx_version = 6
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    def remove_extra_inputs(self, context):
 | 
			
		||||
@ -29,7 +29,7 @@ class CameraSetNode(LnxLogicTreeNode):
 | 
			
		||||
        if self.property0 == 'DoF F-Stop':    
 | 
			
		||||
            self.add_input('LnxFloatSocket', 'DoF F-Stop', default_value=128.0)#8
 | 
			
		||||
        if self.property0 == 'Tonemapping':   
 | 
			
		||||
            self.add_input('LnxBoolSocket', 'Tonemapping', default_value=False)#9
 | 
			
		||||
            self.add_input('LnxIntSocket', 'Tonemapping', default_value=5)#9
 | 
			
		||||
        if self.property0 == 'Distort':    
 | 
			
		||||
            self.add_input('LnxFloatSocket', 'Distort', default_value=2.0)#10
 | 
			
		||||
        if self.property0 == 'Film Grain':    
 | 
			
		||||
@ -70,6 +70,13 @@ class CameraSetNode(LnxLogicTreeNode):
 | 
			
		||||
        self.add_output('LnxNodeSocketAction', 'Out')
 | 
			
		||||
 | 
			
		||||
    def draw_buttons(self, context, layout):
 | 
			
		||||
        if self.property0 == 'Tonemapping':
 | 
			
		||||
            layout.label(text="0: Filmic")
 | 
			
		||||
            layout.label(text="1: Filmic2")
 | 
			
		||||
            layout.label(text="2: Reinhard")
 | 
			
		||||
            layout.label(text="3: Uncharted2")
 | 
			
		||||
            layout.label(text="5: Agx")
 | 
			
		||||
            layout.label(text="6: None")
 | 
			
		||||
        layout.prop(self, 'property0')
 | 
			
		||||
        
 | 
			
		||||
    def get_replacement_node(self, node_tree: bpy.types.NodeTree):
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user