Path-trace pipeline nodes
This commit is contained in:
parent
bbd7ee2353
commit
73325c8244
26
Assets/pt_material.json
Normal file
26
Assets/pt_material.json
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"material_resources": [
|
||||
{
|
||||
"contexts": [
|
||||
{
|
||||
"bind_constants": [],
|
||||
"bind_textures": [],
|
||||
"id": "pt_trace_pass"
|
||||
}
|
||||
],
|
||||
"id": "pt_trace_material",
|
||||
"shader": "pt_trace_pass/pt_trace_pass"
|
||||
},
|
||||
{
|
||||
"contexts": [
|
||||
{
|
||||
"bind_constants": [],
|
||||
"bind_textures": [],
|
||||
"id": "pt_final_pass"
|
||||
}
|
||||
],
|
||||
"id": "pt_final_material",
|
||||
"shader": "pt_final_pass/pt_final_pass"
|
||||
}
|
||||
]
|
||||
}
|
Binary file not shown.
|
@ -205,13 +205,14 @@ def load_library():
|
|||
data_path = output[:-8] + "blender/data/data.blend" # Remove 'Sources/' from haxelib path
|
||||
|
||||
with bpy.data.libraries.load(data_path, link=False) as (data_from, data_to):
|
||||
data_to.node_groups = ['forward_pipeline', 'forward_pipeline_noshadow', 'deferred_pipeline', 'PBR']
|
||||
data_to.node_groups = ['forward_pipeline', 'forward_pipeline_noshadow', 'deferred_pipeline', 'pathtrace_pipeline', 'PBR']
|
||||
|
||||
# TODO: cannot use for loop
|
||||
# TODO: import pbr group separately, no need for fake user
|
||||
bpy.data.node_groups['forward_pipeline'].use_fake_user = True
|
||||
bpy.data.node_groups['forward_pipeline_noshadow'].use_fake_user = True
|
||||
bpy.data.node_groups['deferred_pipeline'].use_fake_user = True
|
||||
bpy.data.node_groups['pathtrace_pipeline'].use_fake_user = True
|
||||
bpy.data.node_groups['PBR'].use_fake_user = True
|
||||
|
||||
def register():
|
||||
|
|
|
@ -383,7 +383,7 @@ vec3 calculateColor(float time, vec3 origin, vec3 ray, vec3 light) {
|
|||
|
||||
// do light bounce
|
||||
colorMask *= surfaceColor;
|
||||
accumulatedColor += colorMask * (0.8 * diffuse * shadowIntensity);
|
||||
accumulatedColor += colorMask * (0.5 * diffuse * shadowIntensity);
|
||||
accumulatedColor += colorMask * specularHighlight * shadowIntensity;
|
||||
|
||||
// calculate next origin
|
||||
|
|
Loading…
Reference in a new issue