forked from LeenkxTeam/LNXSDK
merge upstream
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
from typing import Any, Callable, Optional
|
||||
from typing import Any, Callable, Dict, List, Optional, TypeVar, Union
|
||||
|
||||
import bpy
|
||||
|
||||
@ -32,8 +32,8 @@ else:
|
||||
is_displacement = False
|
||||
|
||||
# User callbacks
|
||||
write_material_attribs: Optional[Callable[[dict[str, Any], shader.Shader], bool]] = None
|
||||
write_material_attribs_post: Optional[Callable[[dict[str, Any], shader.Shader], None]] = None
|
||||
write_material_attribs: Optional[Callable[[Dict[str, Any], shader.Shader], bool]] = None
|
||||
write_material_attribs_post: Optional[Callable[[Dict[str, Any], shader.Shader], None]] = None
|
||||
write_vertex_attribs: Optional[Callable[[shader.Shader], bool]] = None
|
||||
|
||||
|
||||
@ -58,7 +58,6 @@ def make(context_id, rpasses):
|
||||
con['alpha_blend_destination'] = mat.lnx_blending_destination_alpha
|
||||
con['alpha_blend_operation'] = mat.lnx_blending_operation_alpha
|
||||
con['depth_write'] = False
|
||||
con['compare_mode'] = 'less'
|
||||
elif particle:
|
||||
pass
|
||||
# Depth prepass was performed, exclude mat with depth read that
|
||||
@ -66,6 +65,9 @@ def make(context_id, rpasses):
|
||||
elif dprepass and not (rpdat.rp_depth_texture and mat.lnx_depth_read):
|
||||
con['depth_write'] = False
|
||||
con['compare_mode'] = 'equal'
|
||||
else:
|
||||
con['depth_write'] = mat.lnx_depth_write
|
||||
con['compare_mode'] = mat.lnx_compare_mode
|
||||
|
||||
attachment_format = 'RGBA32' if '_LDR' in wrd.world_defs else 'RGBA64'
|
||||
con['color_attachments'] = [attachment_format, attachment_format]
|
||||
|
||||
Reference in New Issue
Block a user