kink3d / kmirrors Goto Github PK
View Code? Open in Web Editor NEWPlanar reflections for Unity's Universal Render Pipeline.
License: MIT License
Planar reflections for Unity's Universal Render Pipeline.
License: MIT License
I'm being especially dumb today but I can't get this to work. The Wiki implies I just need to add it to a scene but I can't see anything in the scene or game view other than a transform gizmo. Am I supposed to do something with kShading as well? The
Any chance you could include a demo scene? It's nice to start from a working example.
I've spent over an hour debugging this, trying to get it to work and even downloading others example projects and still no luck getting a reflection to render.
If you are setting this up without a kToons dependency then you'll first need to make a custom ShaderGraph, you can name this kMirror.
The important thing to do when setting up this shadergraph is to make sure your _ReflectionMap property has "Exposed" unchecked! This will allow the shader to access the setGlobalTexture() property the script is setting.
After that, create a new material and change its Shader to your new "ShaderGraphs/kMirror" and apply that to your reflective object and it should work fine assuming you have the camera set up properly.
Hello, everything works well in the Unity Editor, after the build it looks like this. Mobile platform, Unity 2022.3.5, color space Linear
Add graphics tests to cover visual elements that cant be covered by editor tests. Investigate different ways to implement a graphics test framework.
Tests to consider:
I changed Mirror.cs:218 from
if(!descriptor.Equals(m_PreviousDescriptor))
to
if(!descriptor.Equals(m_PreviousDescriptor) || m_RenderTexture == null)
Not sure if ideal but works for me.
Currently reflecting a surface that has mirror reflections is undefined. Look in to recursive planar reflection (see paper here)
Hello !
Everything works perfectly, but in vr there is a bad looking offset between the two eyes, do you have any idea for that ?
Thanks
This is the error message displayed in the editor:
[Package Manager Window] Unable to add package [file:C:/Users/[user]/Downloads/kMirrors-master/kMirrors-master]:
Package com.kink3d.mirrors@file:C:\Users[user]\Downloads\kMirrors-master\kMirrors-master has invalid dependencies or related test packages:
com.unity.render-pipelines.universal (dependency): Version '7.x.x' is invalid. Expected a 'SemVer' compatible value.
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
would be cool if you could help
I'm observing an odd artifact when I have a scene with multiple mirrors. I switched the various mirror components into local mode and set them to pass their texture to a specific renderer in the scene. In general, each one looks right but every so often some black stripes slowly crawl across the mirror at a very specific and repeatable distance.
I have a video example here: https://youtu.be/qCZzTZngyvA
Expected Behavior: Multiple mirrors in a scene should be possible if you set them to local mode and assign the proper renderer. They will not reflect each other recursively but the first bounce reflection should look right.
Observed Behavior: While it works in general, every so often some very noticeable artifacts appear of black lines crawling across the mirror.
Speculation: I'm wondering if this is a mipmap or LOD artifact since it comes in at a very predictable and repeatable distance to the mirror.
Thanks for sharing,I encountered some errors when using, I don't know the reason, what should i do
Missing Profiler.EndSample (Every BeginSample call must have a subsequent EndSample call within the same frame): Mirror 28230 Previous 5 samples: RenderLoop.CleanupNodeQueue RenderTexture.SetActive Graphics.Blit RenderTexture.SetActive FinalBlit In the scope: Mirror 28230 Inl_ScriptableRenderContext.Submit Inl_RenderPipeline.BeginCameraRendering Inl_RenderCameraStack Inl_UniversalRenderTotal
By following the wiki I got to a point, where last thing to set up in my project is to select the source of environmental reflections on a material with kShading Lit shader. The whole "Source" input is simply missing. Any idea why?
Using Unity 2019.3.4f1 with URP 7.3.1 and having Android as target platform.
Thanks for any hints.
I am trying to make a floor reflective using the kMirror method for the floor object itself. I would like the walls, which are planar objects (no volume) to be affected by reflection probes.
I am not sure if there is a contradiction per design, but when a kMirror object is added, a reflection probe placed in the same scene does not render the front face of the planar objects, i.e. of a plane GO. I figured that if the material on the planar object is set to render the back face (or both) the reflection probe render is fine.
Any suggestions on this odd behaviour?
As a note, if the kMirror component is disabled then the reflection probe bakes everything as expected.
It seems that it is not possible to overwrite the culling mask of the mirror camera without code. But that would be extremely useful. Please include it in the next update.
thank you so much for this amazing package.
I would like to know how to set up multiple mirror at the same time? When i assign Kmirrors to different surface it is working individually but in game mode its showing only one mirror reflecting.
If a renderer feature for Depth Normals (or Decals, which seems to have something like that built-in) is enabled, it will cause this error and make the game window black:
"A non-multisampled texture being bound to a multisampled sampler. Disabling in order to avoid undefined behavior. Please enable the bindMS flag on the texture. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)"
in Unity 2021.3.6.f1. These features are necessary for doing things that are pretty basic to game art workflows, not some super niche stuff. Anyone know of a quick workaround?
otherwise, really really great package so far! been a joy to use :)
If a base and overlay camera are being used in the scene the mirror will not work as expected.
Hey, just testing this package out and it looks great.
However, it's taking a huge toll on performance for my project.
Is there a way to render the mirror without shadows?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.