GithubHelp home page GithubHelp logo

aarthificial / pixelgraphics Goto Github PK

View Code? Open in Web Editor NEW
336.0 5.0 27.0 138 KB

A collection of pixel art visual effects

License: MIT License

C# 71.56% HLSL 14.76% ShaderLab 10.52% JavaScript 3.15%

pixelgraphics's Introduction

pixelgraphics's People

Contributors

aarthificial avatar benherbst avatar semantic-release-bot 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

pixelgraphics's Issues

Bug with sprite sheets

Hi I would like to report a bug I experienced while using a sprite from a sprite sheet as main texture. The resulting bug is as follows:

Grass_Problem

The first row of sprites of the sprite sheet are ok, but from the second row onwards the grass sprites start showing some pixels up top like showed in the first image.

Now the strange part is when the bushes start the problem goes away again, so probably not only related to the rows of the sprite sheet that I am using as main texture. Like you can see in the next images / gifs:

Grass_Problem_01

Sprite Sheet

VegetationShaderProblem

OK Bush

VegetationShaderProblem_01

Not OK Grass from second row of the sprite sheet

That's about it, all the other functionalities are working just fine.

v1.0.1 Render feature does not work with Unity 2022 and URP 14

Issue Error Log:
You can only call cameraColorTarget inside the scope of a ScriptableRenderPass. Otherwise the pipeline camera target texture might have not been created or might have already been disposed.
UnityEngine.Rendering.Universal.ScriptableRenderer:get_cameraColorTarget ()
Aarthificial.PixelGraphics.Forward.VelocityRenderFeature:AddRenderPasses (UnityEngine.Rendering.Universal.ScriptableRenderer,UnityEngine.Rendering.Universal.RenderingData&) (at ./Library/PackageCache/com.aarthificial.pixelgraphics@5d5d2dab89/Runtime/Forward/VelocityRenderFeature.cs:38)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Couldn't open include file

Shader error in 'Hidden/PixelGraphics/Velocity/Blit': Couldn't open include file 'Packages/com.unity.render-pipelines.universal/Shaders/Utils/Fullscreen.hlsl'. at line 45

grass_pixelart_shader not working -.- [SOLUTION FOUND]

Recently came across your channel and loved your foliage video. The thing is though, the "grass_pixelart_shader" turns my grass sprite invisible. The "grass_shader" works fine however. I am in

I did as the video said, Create New Material. Change it's shader to "grass_shader" or "grass_pixelart_shader". Place either one into the object you want.

image

What would the solution be?

image
This is my pixel perfect camera if that helps. I don't want to upscale because my other sprites lose quality with it on.

Perspective camera mode fix [experimental]

Ok, as some users have been having this issue, I thought I'd give it a go and I think a found a solution.

If you have an orthographic camera, all is good:
GRASS1

Now, if you use perspective, then this weirdness will happen:
GRASS2

After some fiddling, here's my fix, on perspective mode:
perspective-fix

So, what changed? Basically, after dumping some values, I noticed the values for _originalCamera.projectionMatrix had a very noticeable difference between two camera modes. Like, in ortho you have tiny values like 0.09, while in perspective, this number was the same, but with less zeros (ie 0.9), so I kinda added this zero back, and all is good.

Basically the fix would be replacing this line:

cmd.SetGlobalVector(ShaderIds.CameraPositionDelta, screenDelta * 0.5f);

... for this one:
cmd.SetGlobalVector(ShaderIds.CameraPositionDelta, screenDelta * 0.05f);

I tested different camera Z positions, FOV values and all seem to be working fine, but needs more testing.

If anyone is happy to further test or have the definitive fix, feel free to contribute. Hope this is useful for someone as it is for me!

Cinemachine Confiner not working when using VelocityCamera.cs

Hello, I'm having a problem where as long as I have the VelocityCamera component in my camera, the cinemachine confiner extension doesn't work at all. I really like the foilage shader and need the velocitycamera for interactive grass and it's hindering development; so a reply would be sincerely appreciated.

As always, have a good day!

Error in Unity

Library\PackageCache\com.aarthificial.pixelgraphics@dbe057a\Runtime\Forward\VelocityRenderFeature.cs(38,13): error CS0619: 'ScriptableRenderPass.ConfigureTarget(RenderTargetIdentifier)' is obsolete: 'Use RTHandle for colorAttachment'

Camera mode

I apologize if this was mentioned somewhere but does this only work with Orthographic camera?
I use perspective camera for the parallax effect and I was wondering if this could be modified in some way to work with perspective camera, didn't know where else to reach so I figured I'd create an issue

Movable camera

Moving the camera mess with the velocity texture. Any advice?

Velocity Emitters not going invisible (With Render Feature on 2D Renderer)

Works fine with a Universal Renderer (previously known as Forward Renderer I guess).
Wondering if anyone knows how to get around this? I'd love to use this with a 2D renderer but there's no "Transparent Layer mask" option for 2D renderer

Currently the only thing I've figured out is to set the sorting layer below everything else like and just hope I always have something in the background to make sure the emitter sprite is covered.

Grass_material showing black grass

Recently I tried to install the package and follow the tutorial but when I add the grass material to the grass it made all the black goes black
Screenshot 2022-06-06 100733
the grass is still moving but it's just all black like so.
I'm using Unity 2020.3.18f1

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.