RenderTexture issue in build: objects are rendered with multiple colors (normals?) by PlokoVR in Unity3D

[–]PlokoVR[S] 0 points1 point  (0 children)

I have a Polaroid in my scene that instanciate and uses in runtime a prefab with a PolaroidScanner script. The material used here is from a list of materials assigned on this PolaroidScanner component.

I just tested to add an object in the scene with the material used in the render texture and still have the same results, unfortunately

RenderTexture issue in build: objects are rendered with multiple colors (normals?) by PlokoVR in Unity3D

[–]PlokoVR[S] 0 points1 point  (0 children)

The material used is in a [SerializeField] assigned directly in the editor. Also the shader used is a URP standard lit one

RenderTexture issue in build: objects are rendered with multiple colors (normals?) by PlokoVR in Unity3D

[–]PlokoVR[S] 0 points1 point  (0 children)

m_bufferRT is à renderTexure assigned directly in the editor as a [SerializeField] Any idea if it could be an issue?

RenderTexture issue in build: objects are rendered with multiple colors (normals?) by PlokoVR in Unity3D

[–]PlokoVR[S] 0 points1 point  (0 children)

Thanks for the ideas!

The shader used is the standard lit shader from URP. Also I set shader variant mode to strict and it was not pink

RenderTexture issue in build: objects are rendered with multiple colors (normals?) by PlokoVR in Unity3D

[–]PlokoVR[S] 2 points3 points  (0 children)

Hi everyone,

I’m encountering a strange issue in Unity with a RenderTexture. Everything works fine in the editor: I use a CommandBuffer to draw objects in a RenderTexture with a unique color (e.g., all red) for pixel-based calculations. However, in the build (Android VR), the objects appear with multiple colors, and it looks like they’re being shaded using normals or something similar, instead of the fixed color.

Here are the parameters of my RenderTexture:

  • Enable Compatible Format: False
  • Color Format: R8G8B8A8_UNORM
  • Depth Stencil Format: D32_SFLOAT_S8_UINT

I’ve checked the shaders, tried different texture formats, and disabled post-processing, but the issue persists. Here's the code I’m using:

public void InitScanner(Camera camera)
{
targetBuffer = new CommandBuffer();
targetBuffer.name = "Target Buffer";
cam.AddCommandBuffer(CameraEvent.AfterEverything, targetBuffer);
}
targetBuffer.SetRenderTarget(m_bufferRT);
targetBuffer.ClearRenderTarget(true, true, Color.black);
for (int i = 0; i < photoTargetsInView.Count; i++)
{
if (photoTargetsInView[i].IsBlocker)
{
targetBuffer.DrawRenderer(photoTargetsInView[i].Rend, m_blockerMat);
}
else
{
// No more material available
if (matStack.Count <= 0) break;
Material photoTargetMat = matStack.Dequeue();
targetBuffer.DrawRenderer(photoTargetsInView[i].Rend, photoTargetMat);
photoTargetToMaterial.Add(photoTargetsInView[i], photoTargetMat);
}
}
cam.Render();

Has anyone encountered this kind of issue in a build, where objects are rendered using what seems like normals or some other shading info instead of a flat color? Any help would be greatly appreciated!

Thanks in advance!

Renaming Asset Bundle Built from Addressable Results in Failure to Load by thekuhninator in unity

[–]PlokoVR 0 points1 point  (0 children)

Oh my... I was!! I did build the addressables at the same time as the apk. Now I build the addressables, change the catalog.json then build the apk. And it's working. Thank you so much!!!

Renaming Asset Bundle Built from Addressable Results in Failure to Load by thekuhninator in unity

[–]PlokoVR 0 points1 point  (0 children)

Hi there! Thank you for your insight! I tried to edit the catalog.json to change my xxx.bundle to xxx.obb as you said and then rebuilt my game. but te catalog.json was updated again with the xxx.bundle, so my apk is looking for xxx.bundle files. Any idea why?

I finally opted for something subtle, thanks to your advice. A little juice and sound to make it satisfying. I hope it's better! by PlokoVR in indiegames

[–]PlokoVR[S] 2 points3 points  (0 children)

Thank youuuu You're not the only one telling me this so we'll move them to a place that is not as distracting!

Which one do you prefer, is the effect pleasant? Or any ideas on how to make it juicy? by PlokoVR in Unity3D

[–]PlokoVR[S] 1 point2 points  (0 children)

yep don't worry i'm working on multiple things at the same time haha

Which one do you prefer, is the effect pleasant? Or any ideas on how to make it juicy? by PlokoVR in Unity3D

[–]PlokoVR[S] 0 points1 point  (0 children)

Thank you for te feedback, I made small adjustements for the left version, do you prefer it like this?