Code Monkey home page Code Monkey logo

com.hauntedpsx.render-pipelines.psx's Introduction

com.hauntedpsx.render-pipelines.psx

A scriptable render pipeline for emulating Playstation-1-style graphics on contemporary hardware.

Built for, and verified in Unity version 2019.3, 2019.4 LTS, 2020.1, 2020.2, 2020-LTS, 2021.1, 2021.2, 2021-LTS, 2022.1, 2022.2

Installation Guide

https://github.com/pastasfuture/com.hauntedpsx.render-pipelines.psx/wiki/Installation-Guide

Discord Server

The Haunted PS1 -> Collabs -> hpsxrp https://discord.com/invite/3Yg3Yhh

Primary Author Itch.io

https://pastasfuture.itch.io and https://future-reality-softworks.itch.io/

com.hauntedpsx.render-pipelines.psx's People

Contributors

jasondibenedetto avatar joshuaskelly avatar pastasfuture avatar pixeldough 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

com.hauntedpsx.render-pipelines.psx's Issues

Errors when using any other color LUT modes in the fog volume

Changing the color LUT mode to any other setting causes all the materials to go solid pink, and results in this error in the console:
image

This happens in every single project I've tested it in. I know it was working before, but something in a recent update must have brought up an issue.

PSXRenderPipelineLighting::PushDynamicLightingParameters() incorrectly culls lights based on GameObject layer

I'm unsure if this was intentional (it looks like it to me), but BIRP, URP and HDRP do not cull lights based on if their GameObject layer is in the Camera's culling mask. PSXRenderPipelineLighting::PushDynamicLightingParameters() has a conditional on line 90 that does this:

if (IsLightLayerVisible(light.light.gameObject.layer, camera.cullingMask))

Lights already have their own culling mask for which layers they do and do not affect.

Apple Silicon support

Any signs of this coming? This render pipeline currently doesn't support Apple's M series chips as far as I can tell.

error CS1501: No overload for method 'SetReferenceSize' takes 3 arguments

I got two errors when trying to install the hpsxrp in a new empty project:

Library\PackageCache\com.hauntedpsx.render-pipelines.psx@a28da49\Runtime\RenderPipeline\PSXCamera.cs(152,23): error CS1501: No overload for method 'SetReferenceSize' takes 3 arguments

Library\PackageCache\com.hauntedpsx.render-pipelines.psx@a28da49\Runtime\RenderPipeline\PSXCamera.cs(153,29): error CS1501: No overload for method 'SwapAndSetReferenceSize' takes 3 arguments

Unity version used: 2021.3.5f1

Single-pass instancing and XR Plug-in

Is it possible to add single-pass instancing support that is used by the XR Plug-in?

I've been trying to make a VRChat map with this shader but I get the following error when I compile the PSXLit shader:
undeclared identifier 'unity_StereoEyeIndex' at MYPROJECT/Library/PackageCache/[email protected]/ShaderLibrary/UnityInstancing.hlsl(205) (on d3d11)

This only happens when the XR Plug-in is present.

Unity version: 2022.3.6f1
Package version: 2022-lts-support #42

Any way to get a camera to ignore light sources when rendering?

I need to run a cutscene in a sort of miniature "set" far above or below the game world, in various worlds. I need it to have the same dark lighting conditions every time it's seen, but despite the camera used to render it set to ignore the layer that the lights are on, they still effect the cutscene models. Is this not the way this sort of thing should be achieved? Or is this a bug with the rendering system?

It would be frustrating to have to keep track of every light source in every scene just to be able to disable them before the cutscene plays.

Particles using materials with Texture Filter Mode set to "N64" display incorrectly

While using the N64 Texture Filter Mode, if I set the material to not use alpha clipping, the texture appears with no alpha at all in the particle. However, if I enable alpha clipping (or change the material to use Transparent Surface Type), they look like a strange distorted line, or don't appear at all

Without N64 mode:
image

With the N64 mode:
image

manual install?

how can i manually install this , when my git installation is not fixable and cannot use the URL method

Add License

No license has been set for this repository.

Gameobject Flicker Issue (Material)

So I have been trying out this shader for a while and came across some issue. When I changed the material to the corresponding shader, it has this kind of flickering, where the trees pop in and out, although the trees are present because I can collide with their colliders except they're not being rendered, they just flicker everywhere, it also happens with objects that I just changed the material to PSX/Lit,. Here's the video and pictures for additional information.

https://github.com/pastasfuture/com.hauntedpsx.render-pipelines.psx/assets/104110725/b1dc7043-47e6-4109-84c7-db081494f7e1
https://github.com/pastasfuture/com.hauntedpsx.render-pipelines.psx/assets/104110725/1944ef2a-04a0-4c12-9772-c6addcae3d74

image_2023-05-15_125328837

any fix to this? thank you!

No rendering and errors in console despite reinstall, restart, and creation of global volumes with PSX quality enabled.

I've attempted to update my project to a new version of the psx render pipeline in order to use the tools that newer versions of unity provide. Unfortunately, no matter what I do, it seems to create the same error in console constantly and will not render anything, even with the proper material, pipeline asset, etc. I've tried multiple versions, from 2020.3.48f1, to 2021.3.25f1, and also 2022.2.21f1. None have worked and the console is constantly pinged with:

"MissingReferenceException: The object of type 'Texture2D' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Texture.get_width () (at :0)
HauntedPSX.RenderPipelines.PSX.Runtime.PSXRenderPipeline.PushGlobalRasterizationParameters (UnityEngine.Camera camera, UnityEngine.Rendering.CommandBuffer cmd, UnityEngine.Rendering.RTHandle rasterizationRT, System.Int32 rasterizationWidth, System.Int32 rasterizationHeight, System.Boolean hdrIsSupported) (at ./Packages/com.hauntedpsx.render-pipelines.psx-master/Runtime/RenderPipeline/PSXRenderPipeline.cs:913)
HauntedPSX.RenderPipelines.PSX.Runtime.PSXRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera[] cameras) (at ./Packages/com.hauntedpsx.render-pipelines.psx-master/Runtime/RenderPipeline/PSXRenderPipeline.cs:291)
UnityEngine.Rendering.RenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List1[T] cameras) (at <cd86b0d4df634b6a8fd612065f941dcd>:0) UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List1[T] cameras) (at :0)
UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, UnityEngine.Object renderRequest, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)"

Issue with Git-LFS and Unity auto-pull

Probably more of an issue with Unity's builtin Package Importer, but I had to manually pull in the image files since they are being hosted with Git-LFS.

Could possibly mention in the wiki about needing to download the image files in Runtime/RenderPipelineResources/Texture separately.

System.ArgumentException: Kernel 'CSMain0' not found.

System.ArgumentException: Kernel 'CSMain0' not found.
at (wrapper managed-to-native) UnityEngine.ComputeShader.FindKernel(UnityEngine.ComputeShader,string)
at HauntedPSX.RenderPipelines.PSX.Runtime.PSXRenderPipeline.FindCompressionKernels (HauntedPSX.RenderPipelines.PSX.Runtime.PSXRenderPipelineAsset asset) [0x00038] in /home/admin/Interference/Packages/com.hauntedpsx.render-pipelines.psx/Runtime/RenderPipeline/PSXRenderPipeline.cs:1049

I am running unity 2021.3.32f on Manjaro.

D3D11 swapchain error causing GPU timeout

Occasionally, a project will get stuck in a rut where any new materials created and added to a material in scene (while the quality override volume is enabled) will cause the engine to crash with this error:
image

After a lot of testing, we found that sometimes deleting the Library folder fixes the issue, but only temporarily, and any new materials created after that would bring the issue back.

I've seen several other users report this bug, all with very similar circumstances.
image

It seems it might be related to Unity 2021.1, as another user I talked with who was encountering the issue was not able to fix it by downgrading their project, but upon creating an entirely fresh project in 2020.3, the issue didn't happen. The same thing happened to me in my testing. However, I have had the issue crop up in a project that has never even touched 2021.1, so it's hard for me to tell if the two issues are actually related or just result in the same crash.

doesnt download properly

When I try to open unity the package starts downloading then says this:
2021-01-02 (2)

I don't know if I've done something wrong, or if this is an easy fix since the only code I know is HTML but If anyone could help that'd be great

Render Texture doesnt have any transparency

I tried to give my fps weapon its own camera and use a render texture to display the weapon on top of everything but I've realized that the render textures doesn't currently have working transparency (compared to the built-in pipeline), to reproduce this effect just create 2 cameras, 1 normal one and 1 for the render texture. Then make a raw image and put the render texture to the texture field. Make sure the camera with the render texture has "Clear Flags" set to Depth only and for the culling mask make it only render one layer.

Lightmap baking errors when using vertex colors and per-pixel lighting

When attempting to bake my lightmaps in my game, a recent issue has shown up where it fails to bake the indirect lighting on materials that have vertex colors and per-pixel lighting enabled, resulting in extremely dark shadows on those materials.

The errors that show up in the console are two:
Shader error in 'PSX/PSXLit': 'ApplyVertexColorPerPixelColorVertexColorModeColor': no matching 3 parameter function at /Users/PixelDough/Documents/Unity Projects/ProjectRemade/Packages/HPSXRP/Runtime/Material/PSXLit/PSXLitMetaPass.hlsl(115) (on d3d11)
and
Shader error in 'PSX/PSXLit': undeclared identifier 'vertexColorBlendMode' at /Users/PixelDough/Documents/Unity Projects/Project/Packages/HPSXRP/Runtime/Material/PSXLit/PSXLitMetaPass.hlsl(115) (on d3d11)

I have pics to show the comparison between before and after this bug started happening.
Before:
image
After:
image

Pink textures in a build.

Everything works fine in the editor but in a build all textures are pink. I have this problem in both main project and completely new project. Followed install guide in a wiki.

Also found this post on the reddit with same problem: https://www.reddit.com/r/Unity3D/comments/1aofy9p/textures_not_showing_when_building_hpsxrp_but/

Editor
image

Build
image

Tried to add shader to Project Settings > Graphics > Always Include Shader but now I'm getting this error: PSX/PSXLit has too many Shader variants (4423644). To resolve this, go to Project Settings > Graphics and remove this Shader from the Always Included Shaders list. For more explicit control over how Unity includes specific Shader variants in a build, use a ShaderVariantCollection.

Problem persists with Volume and without it.

Unity version: 2023.1.10f1
Package version: 1.7.0

upd: Just saw that my unity version isn't supported. Is there a way to add support for newer versions of unity?

Canvas order is not considered for non-Overlay legacy Canvas UI

Canvas order is ignored because PSXRenderPipeline.DrawLegacyCanvasUI() does not use proper SortingCriteria for the SortingSettings instance created for rendering. This should do the trick:

var sortingSettings = new SortingSettings(camera)
{
    criteria = SortingCriteria.CommonTransparent
};

Installation guide with OpenUPM in the wiki

Hi, I'm a fellow package author. Great render asset by the way! Looks awesome ๐Ÿ‘

I was just looking at the install instructions but it didn't talk about an install option for using OpenUPM. All package installation options are useful in their own way, but I personally find that using OpenUPM is the simplest way to install any packages because I don't need to dig into any manifest files. It's basically just one command and it adds to a package registry so that there is an easy update button in the Unity package manager, which is such a convenient feature also. Users installing your package could potentially have a smoother time trying to install, along with the other benefits like updates in the package manager.

It looks like your project was automatically generated up on the OpenUPM website (it's versioned by pushing git tags), so there's no extra effort required on your end. I think that the only thing to do is encourage this install option in your wiki guide.
https://openupm.com/packages/com.hauntedpsx.render-pipelines.psx/

Just wanted to let you know about this if you didn't yet.
I'm considering trying a game with this type of rendering, it might be cool ๐Ÿ™‚

Wanting to outline my player

Hello, I and a friend are wanting to add a function to the psx shaders that would render an outline around the player. We have looked at normal tutorials but we are a bit stuck. Any idea how we could get this done? Basically we are wanting to edit the shaders.

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.