Giter VIP home page Giter VIP logo

volumetriclights's People

Contributors

arrqh avatar kwnetzwelt avatar nxrighthere avatar slightlymad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

volumetriclights's Issues

2 errors in Unity 2017.1.1.f1

Hi! I'm getting these 2 errors in Unity 2017.1.1.f1:

  • Assertion failed: Assertion failed on expression: 'IsNormalized(dir)'
  • Assertion failed: Assertion failed on expression: 'IsNormalized(ray.GetDirection())'

And I don't know if this is related to me, using a newer engine version, or just a bug...

Thank you! :)

Effect disabled after using light for baking

Hi,

first of all thanks very much for this great stuff!

Here´s my issue:
I use a directional light (Realtime mode) as a sun for my outdoor scene.
I setup the VoluemticLighting component on this light to get some nice godrays using realtime shadows.
I see everything is fine in runtime.

I switch this light to Baked mode for baking some lightmaps.
I switch this light back to realtime mode but the godrays are no longer present in runtime.

I clear baked data and godrays are present again.

Any ideas?

Kind regards,
Carsten

Camera Flip

For some reason when i hit play camera flips 180 and mirrors the image horizontal
1
2
3

This also happens on example scenes that VL provides

Is it not work in iOS?

I tried but received this message:

Invalid pass number (2) for Graphics.Blit (Material "Hidden/BilateralBlur" with 1 passes)
UnityEngine.Graphics:Blit(Texture, RenderTexture, Material, Int32)
VolumetricLightRenderer:OnRenderImage(RenderTexture, RenderTexture) (at Assets/Scripts/VolumetricLightRenderer.cs:337)

Multiple cameras

Hi,

I have been using this Unity extention and it's great! But I came across one problem. To avoid gun clipping I have added second camera that draws only player and gun.

So my main camera has depth -1, and my gun camera has depth 1. With that I cannot see cone or any lightning effects. I alo can't add renderrer script to gun camera since it does not render walls.

Is there a way to bypass this problem or should I try different way to fix gun clipping?

Wont work in specific scene

For some reason, In one specific scene, the light just goes like "yeah, i'm not gonna be volumetric" and just fails, leaving a shitstain of disappointment on my entire project, Thinking it my be a problem with my version of unity, i opened an example script and it worked fine. i did literally the exact same things as in the example, and it still doesn't want to work.

edit: oops i fixed it. the range of the light was too goddamn bigg.

Things sometimes look dark (2017.3.1f1)

Objects turn dark when they are at the opposite side of the light source.

Here's everything looking fine (the light source is pointing at the camera):
1

The building is lit perfectly, but the terrain in the background is darkened (the camera is turned 180 degrees):
2

If we get farther from the building, we see it turning black:
3

This is how everything should be lit. No dark areas or shadows.
4

Error in Unity 2017.1.1p4

Invalid pass number (1) for Graphics.Blit (Material "Hidden/BilateralBlur" with 1 passes)
UnityEngine.Graphics:Blit(Texture, RenderTexture, Material, Int32)
VolumetricLightRenderer:OnRenderImage(RenderTexture, RenderTexture) (at Assets/VolumetricLights/Scripts/VolumetricLightRenderer.cs:354)

Rendering issue from certain angles.

@SlightlyMad
If i have shadows enabled for the spotlight, and it doesn't hit any objects, the light stops rendering / turns invisible if viewed from certain angles.

This can be recreated in the spotlight scene, if you rotate the light upwards, then move the camera and the light upwards, at one point it will stop rendering the light, seems like range has something to do with it as well.

Is this a known issue or something new? The rendering's values seems to stay the same, so I couldn't debug it any further.

Build a package

Can you build the package so i can put it in my project please?

Transparency issues - are they just renderque or more fundamental?

Playing with this volumetric lighting in a project of ours - looks absolutely brilliant, except of course for transparent geometry which looks like it's being rendered later. Is it just a matter of twiddling the shaders' render queues (which I can't seem to do in unity with these compiled shaders), or is there something more fundamental going on?

You can see in this image the water (black bits) seems to be being rendered after the volumetric effect, which is a shame.

volumetric

Slight problem with RenderTexture

It seems that RenderTextures render the textures a bit darker than they should, as you can see in the screenshots. Is there something I might be doing wrong or is this a bug?

Scene with the VolumetricLightRenderer enabled: (you can see where the RenderTexture is, even though both sides of that visible line should be completely white)
screenshot 72

Scene with VolumetricLightRenderer disabled: (you don't see where the normal object stops and the RenderTexture continues because both are completely white)
screenshot 74

Noise Texture should be 8 channel

Save a bunch of GPU memory, set the 3D texture format to A8. When sampling the texture, be sure to do a .a, i.e.

tex3Dlod(noiseTexture, float4(x,y,z,-999.0)).a

I get an error when playing

this is it :
Invalid pass number (1) for Graphics.Blit (Material "Hidden/BilateralBlur" with 1 passes)
UnityEngine.Graphics:Blit(Texture, RenderTexture, Material, Int32)
VolumetricLightRenderer:OnRenderImage(RenderTexture, RenderTexture) (at Assets/Volumetric Light/Scripts/VolumetricLightRenderer.cs:363)
I'm using Unity5.6.7
any help ?

Returning black screen in release builds.

I've done some investigation.
Shaders have been explicitly included in the build.
The problem exists in Unity 5.5 as well as newer version. Tested multiple Unity versions upto 2018, starting at 5.5
The problem only occurs in standalone builds and not in the editor.
The problem seems to be the RayMarch function in VolumetricLight.shader returns black with alpha set to 1 for the entire screen.

Nothing with HD Render Pipeline

Hi. I have used your asset in the development of my game since Unity 5.4. Now, I am moving to HD Render Pipeline, and I can't get your asset working.
What should I do?
Thanks.

Some shaders unaffected by volumetric lights

Materials using certain shaders, transparent shaders in particular, aren't affected by volumetric lights the way others are. In the attached example, you can see that the decals on the wall remain dark, as does a portion of the oil lantern (front left). These using Legacy Shaders/Transparent/Diffuse and Standard Fade, respectively.

Edit: it seems to be related to render queues. Decreasing the render queue for the affected materials seems to fix the issue. I'm wondering if the render queue for the VolumetricLight shader is set too low, though? The issue happens with quite a few default shaders, out-of-the-box. (Unity 5.60f3, FYI)

shot

Effect blinks on half a second after camera spawns

I'm having an issue where the effect kind of "blinks" on shortly after my player camera spawns. Is there a way to force the effect on as soon as the camera is instantiated? Or is this a know issue / something is wrong with my setup? Thanks.

Would like to implement no-fog zones

Hi,

Is there a way to add no fog zones in the shader code?

We currently are running some tests, using the height fog as some kind of mist in our scene, and we want one of the character skills to remove some of the mist. The problem is that the skill is done away from the player, and he can move close or away from that zone.

We know it is possible with Ray Marching to add primitive(s) to the calculation and wondered if you would know where in the code we should be looking in order to achieve what we want?

We don't know if that will look realistic but we want to try it ;p

Cheers!

Effect disabling entirely when no shadows present near camera

Hello!

I'm having an issue that to be quite frank i've been having virtually in all assets of volumetric lights, atmospheric scattering, height fog, global fog, volumetric fog etc...

The effect works great, however whenever there are no shadows being casted near the camera, the effect disables itself entirely.

GIF of problem

Just wanted to know if this is intended behaviour (and by extension intended behaviour of all volumetric effect assets), or if i'm just doing something terribly wrong or anything I might be missing for the proper scene setup, or maybe even if there's something wrong with my GPU drivers.

Doesn't show up on build

Hey I love your asset it looks great. Unfortunately it doesn't show up when I do a build of the project.
I moved all the shaders and the text asset that contains the dds file to the "Resource" folder so it can find it when it builds.
(shaders that are included via Shader.Find() don't get automatically added to the build)
But although there are no longer any error messages the fog still doesn't show up on the build, however it works fine when i play in editor.

Error when used with XBOX ONE as UWP App

Maybe the shader wasn't meant to run on the XBOX One. But I just wanted to inform that it gives this error ["Invalid pass number (1) for Graphics.Blit (Material "Hidden/BilateralBlur" with 1 passes"] when run on the xbox one ...

Resizing Issue

When you resize the window in editor while playing the fog intensity goes up exponentially until the screen is white. Also happens when you hit pause.

Not rendering at all, can't explain exactly why

Not rendering at all, can't explain, sorry.

Here are the errors that shows:

Invalid pass number (10) for Graphics.Blit (Material "(Unknown material)" with 1 passes)

Invalid pass number (2) for Graphics.Blit (Material "Hidden/BilateralBlur" with 1 passes) UnityEngine.Graphics:Blit(Texture, RenderTexture, Material, Int32) VolumetricLightRenderer:OnRenderImage(RenderTexture, RenderTexture) (at Assets/Volumetric Lights/Assets/Scripts/VolumetricLightRenderer.cs:337)

Changing shadow strength on a light affects volumetric shadows on another light

So lets say I have a point light or spot light somewhere with a volumetric light.
This light will have a shadow strength of something less than 1, let's say 0.7;
Now I add a second light with a volumetric light. This one will have a strength of 1.
The second light's volumetric shadow now behaves like it has the shadow strength of the first one.

Also changing the strength of the first light now affects both volumetric lights.
So basically the volumetric lights take the lowest shadow strength of all volumetric lights that are available and uses it for all volumetric shadows in the players view.
It happens with both spot lights and point lights.

0 7

1 0

Volumetric lights disabled in built package

It's quite confusing that the asset package has no problem, it runs well both in unity editor and
built application.
But when I import the asset to my own project, everything seems ok in unity editor,
then I built a PC package.
All volumetric light effects disappeared.
I think maybe there is something wrong with my settings in unity.
I'm using 2018.3.9

VR Compatibility

The lights are great but in VR (with an HTC Vive), they are somewhat shifted from the original position in both the right and the left eye but on different positions depending on the eye.

Won't work on unity 2018.1.0b12 with Lightweight render pipeline

As the title says no error no warning but doesn't work anymore
Also using Lightweight render pipeline. Might be the issue.

Using the lightweight render pipeline 1.1.2 installed from the package manager is confirmed the issue.
I don't know what's wrong there is no warning or error but the lights are for sure non volumetric now.

Compiling Problem

Hi,SlightlyMad.
I've been testing this project on a PS4 console.However,there were tons of problems showed up.I managed to handle some of them by converting
float4 centerColor = _MainTex.Sample(sampler_MainTex,uv);
into
float4 centerColor = UNITY_SAMPLE_TEX2D(_MainTex,uv);.
Solved Problems(Image Below):
image
But there are still some issues that drive me mad.(Image Below):
image
I can sense that the problems are caused by PS4 sampler state,sort of.But I can't get any answer or information on the web.
Would you please give me some hints?
Much appreciated.
BTW,sorry for my poor English.(^_^)

Does not work on WebGL

[Error] Invalid pass number (2) for Graphics.Blit (Material "Hidden/BilateralBlur" with 1 passes)
VolumetricLightRenderer.OnRenderImage()    Assets/Plugins/VolumetricLightsSlightltyMad/VolumetricLightRenderer.cs:345
344:   // horizontal bilateral blur at half res
-->345:   Graphics.Blit(_halfVolumeLightTexture, temp, _bilateralBlurMaterial, 2);
347:   // vertical bilateral blur at half res

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.