美文网首页游戏开发
Godot Shader笔记:3D着色器(一)

Godot Shader笔记:3D着色器(一)

作者: 吃烧烤的老王 | 来源:发表于2019-06-19 20:55 被阅读0次

    原文地址:Docs » Shading » Shading reference » Spatial shaders

    译者注:直译为空间着色器下文中直接意译成3D着色器

    3D着色器(Spatial shaders)

    3D着色器用于对3D对象进行着色。它们是Godot提供的最复杂的着色器类型。3D着色器可以使用不同的渲染模式render mode和渲染选项(render option,例如:次表面散射Subsurface Scattering,透射Transmission,环境光遮挡Ambient Occlusion,光晕Rim lighting等),以实现高度的可定制化。用户可以选择性地编写顶点,片元以及光函数来影响物体的渲染。

    渲染模式(Render modes)
    渲染模式 描述
    blend_mix 混合式融合(mix blend)模式 (用alpha作透明通道),此模式为默认模式.
    blend_add 添加式融合(additive blend) 模式.
    blend_sub 相减式融合(subtractive blend) 模式.
    blend_mul 相减式融合(multiplicative blend)模式.
    depth_draw_opaque 只绘制不透明几何体的深度,而不绘制透明几何体
    depth_draw_always 绘制所有的几何体深度 (包括透明和不透明的).
    depth_draw_never 不绘制深度.
    depth_draw_alpha_prepass Do opaque depth pre-pass for transparent geometry.
    depth_test_disable 关闭深度测试
    cull_front 剔除正面
    cull_back 剔除背面 (默认项).
    cull_disabled Culling disabled (double sided).
    unshaded 只渲染慢反射.光照和着色器不对材质发生影响
    diffuse_lambert Lambert shading for diffuse (default).
    diffuse_lambert_wrap Lambert wrapping (roughness dependent) for diffuse.
    diffuse_oren_nayar Oren Nayar for diffuse.
    diffuse_burley Burley (Disney PBS) for diffuse.
    diffuse_toon Toon shading for diffuse.
    specular_schlick_ggx Schlick-GGX for specular (default).
    specular_blinn Blinn for specular (compatibility).
    specular_phong Phong for specular (compatibility).
    specular_toon Toon for specular.
    specular_disabled Disable specular.
    skip_vertex_transform VERTEX/NORMAL/etc. need to be transformed manually in vertex function.
    world_vertex_coords VERTEX/NORMAL/etc. are modified in world coordinates instead of local.
    ensure_correct_normals Use when non-uniform scale is applied to mesh.
    vertex_lighting 使用基于顶点的光照
    shadows_disabled Disable computing shaders in shader.
    ambient_light_disabled Disable contribution from ambient light and radiance map.

    相关文章

      网友评论

        本文标题:Godot Shader笔记:3D着色器(一)

        本文链接:https://www.haomeiwen.com/subject/cfplqctx.html