Hi, I’m working on a project with HDRP, a racing game with customization features. One of these features requires taillight / headlight color manipulation, but there seems to be an issue anytime these areas are changed. I’ve tested this on multiple systems, my PC (Intel I9, Nvidia GeForce RTX Studio), Steam Deck, Xbox One, Xbox Series S, and PS4 with the current system I have in editing these materials and it works fine, no issues.
However, I have encountered a couple users that have discovered this in their playthroughs.
I haven’t been able to figure out a root cause here, and from how I’m editing the materials / flares / lights I don’t see any major issues that would be doing this. I know it specifically is related to when these materials / flares / lights change as these instances are fine if unedited. I’ll attach a script holding sections of code that directly affect the color change for more context:
editOverview.cs (2.1 KB)
The pink-ish look of it really makes me think it is a shader variant issue, but it should happen more frequently than “a couple of users”.
It’s hart to guess what is happening if you can’t reproduce yourself with know conditions … Maybe you can aske for a renderdoc capture to analyse the rendering, and be sure if it is the missing shader issue or not ?
2 Likes
Hi Remy, thanks for the response! Gotcha, haven’t heard of RenderDoc before, will be looking into it.
I should also add after looking into this more, I believe the issue isn’t directly related to the materials being changed, but specifically to user vehicles loading in data before changing materials. Another user had provided a video a while ago showcasing their user car having this issue, but other NPC vehicles using the same color change operations worked fine. So there might be an issue with my handling of the saving / loading operations for colors of vehicles. Still the intensity of the lighting doesn’t make much sense as I’m not adjusting intensity at any point. Will have to look into this more.
video for context (earlier build, didnt have flare textures at this point, so taillights weren’t affected it seems): https://youtu.be/kZ06-N2ouIs?t=1279
Okay, so I figured out the issue.
The way I was saving / loading my color changes was affecting this. I don’t have a lot of data on how exactly it happened as I still wasn’t able to replicate it but I did implement a different color saving technique and the user I had contacted stated this fixed the issue.
My initial save was a Data class that held a filename and a string variable for serialization of the object data. I then serialized those Data classes into a save file. So to change this, I created a custom class that didnt serialize the object data, specifically for the color section, in which the data of the colors only serialized once, rather than twice. I’m assuming the deserialization process I originally had wasn’t assigning values correctly on certain PCs.
Regardless, doesn’t seem to be a shader issue as I initially thought.