Unity 如何在任意物体上自由绘制

视频链接

Unity 如何在任意物体上自由绘制

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;

public class PaintManager : Singleton
{
    public Shader texturePaint;
    private Material paintMaterial;

    int debugUVID = Shader.PropertyToID("_DebugUV");
    int positionID = Shader.PropertyToID("_Position");
    int hardnessID = Shader.PropertyToID("_Hardness");
    int strengthID = Shader.PropertyToID("_Strength");
    int radiusID = Shader.PropertyToID("_Radius");
    int colorID = Shader.PropertyToID("_Color");
    int textureID = Shader.PropertyToID("_MainTex");
    
    CommandBuffer command;

    private void Awake()
    {
        paintMaterial = new Material(texturePaint);

        command = new CommandBuffer();
        command.name = "CommmandBuffer - " + gameObject.name;
    }

    pub

你可能感兴趣的:(面试,学习路线,阿里巴巴,unity,游戏引擎,c#,面试,开发语言)