Coder Social home page Coder Social logo

Comments (4)

akauper avatar akauper commented on August 28, 2024 4

A quick fix:
In Mirror.cs after line 207 add:

var camData = camera.GetUniversalAdditionalCameraData();
if (camData.renderType == CameraRenderType.Overlay)
         return;

from kmirrors.

qiushuisuoyue avatar qiushuisuoyue commented on August 28, 2024

A multisampled texture being bound to a non-multisampled sampler. Disabling in order to avoid undefined behavior. Please use Texture2DMS in the shader.
UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext,UnityEngine.Camera)
kTools.Mirrors.Mirror:RenderMirror (UnityEngine.Rendering.ScriptableRenderContext,UnityEngine.Camera) (at Library/PackageCache/com.kink3d.mirrors@79b0526e5d/Runtime/Mirror.cs:261)
kTools.Mirrors.Mirror:BeginCameraRendering (UnityEngine.Rendering.ScriptableRenderContext,UnityEngine.Camera) (at Library/PackageCache/com.kink3d.mirrors@79b0526e5d/Runtime/Mirror.cs:236)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

a base and overlay camera are being used in the scene the mirror will not work as expected.

from kmirrors.

qiushuisuoyue avatar qiushuisuoyue commented on August 28, 2024

sampler2D _ReflectionMap;
float4 _ReflectionMap_ST;

        v2f vert (appdata v)
        {
            v2f o;
            o.vertex = TransformObjectToHClip(v.vertex.xyz);
            o.uv = TRANSFORM_TEX(v.uv, _ReflectionMap);
            o.screenPos = ComputeScreenPos(o.vertex);
            return o;
        }

        half4 frag(v2f i) : SV_Target
        {
            float2 uv = i.screenPos.xy / i.screenPos.w;
            half4 col = tex2D(_ReflectionMap, uv);
            return col;
        }

unity 2021.2.3

from kmirrors.

Nightfury420 avatar Nightfury420 commented on August 28, 2024

A quick fix: In Mirror.cs after line 207 add:

var camData = camera.GetUniversalAdditionalCameraData();
if (camData.renderType == CameraRenderType.Overlay)
         return;

Damm, THANK YOU!

from kmirrors.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.