Questions tagged [rendertexture]
A texture to which content can be rendered.
86
questions
0
votes
1
answer
32
views
RenderTexture doesn’t work in build
A Gameobject sprite, a Texture2D which is written into using "Texture2D.ReadPixels" works/is visible in the Editor/Play Mode but is not/is invisible when built.
The Texture2D is written to ...
0
votes
1
answer
81
views
How to convert a dynamic VIewportTexture to a "static" one?
Assume there is a viewport that "looks" at some Sprite2D.
This viewport's view is providing the texture for a Sprite3D ...
1
vote
0
answers
39
views
How to pass two RenderBuffers into one RenderTexture?
I have a Unity URP project and in the Scriptable Render Pipeline, I would like to create a RenderTexture and pass the depth and color buffer of the camera object as ...
0
votes
0
answers
35
views
In Unity 2021.3.29, why is a total volumeDepth of just 100 for global texture arrays slowing down the entire game?
In order to apply the metaball effect on a pixel in the Dest RenderTexture, I need the minimum distance to every game object that is involved in generating the metaball effect for that pixel. This ...
0
votes
1
answer
70
views
How to render a portion of a texture (upscaled) without affecting the border with SDL2?
I noticed that render a portion of the texture, upscaling it, it affects is border values with the proximity of the outside remaining parts of the texture (when not using Neareast neighbour ...
0
votes
0
answers
922
views
Why is my RenderTexture y-flipped?
When drawing a very simple RenderTexture using Raylib, with the following POC code, the texture actually drawn is vertically inverted. Is that normal? If not, what ...
1
vote
0
answers
977
views
`Graphics.Blit` into a render texture using a custom material outputs black
Context
I am writing a ScriptableImporter for a specialised image format (the specifics are not relevant). To do so, I need to semi-procedurally generate a ...
2
votes
0
answers
243
views
Is it possible to extract both the color and the depth texture from one RenderTexture and use it in a Shader?
I can access the same with duplicating the cameras AND the rendertextures, but that seems like a lot of overkill of just getting the depth buffer.
I don't need a very precise depth buffer, so it can ...
0
votes
0
answers
1k
views
How to make background of render texture transparent in Unity
I am using render texture to display a model of a 3D character on a menu. I would like the background of the render texture to be made transparent. I have tried to make it transparent by editing the ...
0
votes
0
answers
748
views
How to make shader graph RenderTexture deform effect more accurate?
I have followed a PolyToots tutorial (https://www.youtube.com/watch?v=3T8cKTQrMxk) to make a 'rug deform' effect.
This is great except for that the vertices aren't deforming faithfully enough to ...
0
votes
1
answer
2k
views
Render texture not rendering camera output correctly
I have a strange problem that I am not sure if it is a bug from Unity or not. I have render texture that renders camera output to a raw image. Camera looks at a object that consists of 2 parts: the ...
1
vote
1
answer
198
views
Creating RTV for each array slice of a Texture2DArray
I'm trying to implement depth peeling onto a 2D texture array, where each array slice corresponds to a depth layer. In order to do this, I'd like to draw to subsequent array slices of this texture, ...
0
votes
1
answer
65
views
correct matrix to draw mesh as flat object
I need to draw a tilemap for a 2d game. For that I created vertices with their relative positions already hard baked. The coordinates start top-left with (0f, 0f) and z is always 0.
I rendered them to ...
1
vote
2
answers
1k
views
Why is part of my render texture see-through in Unity?
I have a camera that is looking at an object with render texture output and I use that render texture on raw image in UI.
Object itself has 2 parts:
the ball
kind of a semi transparent mask.
And ...
2
votes
1
answer
1k
views
Sprite created with RenderTexture and ReadPixels() has multiplied colors
I'm working on a character generator that creates thumbnail sprites for each character. I'm using a separate camera that renders to a RenderTexture, which is used ...
0
votes
1
answer
75
views
Multiple viewport resizing
I wonder how multiple viewports are handled in engines in terms of render targets buffers. Especially in the case of their resizing (for example changing the size of windows/viewports in Editor dock ...
0
votes
1
answer
259
views
Hiding objects from the player when working with RenderTextures
I am currently working on a game that has monitors showing the player different elements such as texts, images and numbers. My plan for this is to use Unity's ...
0
votes
0
answers
1k
views
How do I prevent a camera from rendering post-processing effects to a render texture in URP?
So here's my situation. I have two cameras in a game about a bee. The game uses the Universal Render Pipeline. One of them detects blooming terrain at a distance, and is sensitive to its own layer (...
1
vote
1
answer
2k
views
How to control post processing effects per-pixel with a render texture?
My game's protagonist is after a specific resource on the map, its concentration stored in a field on the CPU-side, and I would like to provide a subtle hint as to where it is so that the player can &...
1
vote
0
answers
121
views
Camera not rendering to rendertexture inside class
I have an issue where I created a class to generate a lightprobe atlas texture for me, but the camera don't seem to render properly into teh rendertexture, I have no idea why...
someone can help me ...
1
vote
0
answers
488
views
Cleaning effect with progress counter
I'm working on object cleaning in unity. This effect actually works.
What I still need is the progress, do you have any idea how can I count the progress of the cleaning?
(my code is below)
Thank you ...
2
votes
1
answer
882
views
How to save Unity HDR renderTexture into a .exr file?
[Purpose]:
I need to save the Unity camera view into a .exr file.
[Error]:
Remapping between formats 74 -> 73 is not supported
[What I've tried]:
I tried the ...
0
votes
1
answer
997
views
Why is the Unity pixel color read from RenderTexture bigger than 1?
The pixel color component read from the Unity renderTexture is bigger than 1.0 without HDR environment map.
I'm writing a mini program to test the reflectance of Unity PBS. I use six pure white (1,1,1,...
1
vote
1
answer
4k
views
What color format, depth buffer should I use in a RenderTexture for WebGL screen output in Unity? Is NPOT ok? MipMaps?
Today I learned about a technique for forcing uniform resolution in a Unity WebGL build, as described here in the answer by DMGregory. Yay! I'm experimenting with implementing this technique on a ...
1
vote
0
answers
39
views
I have a problem with updating a RenderTexture being used in combination with a shader
I just can't seem to figure out why I can't save the image I've drawn onto an orthographic RenderTexture.
Here's how my scene works: https://i.sstatic.net/6XkRo.gif
Basically, it's a painting effect ...
0
votes
0
answers
33
views
Comparing object silhouette with a 3d representation
I'm working on a game where a user can draw the outline of an object, I use it to create a mask texture and I want to compare this outline with a 3d object.
The solution I come up with is to render ...
1
vote
1
answer
8k
views
Issue with Texture2D memory leak in Unity
I have a simple method that converts RenderTexture data into Texture2D
...
0
votes
1
answer
617
views
Render texture seems to ignore camera background type
I'm currently trying to pull a fog of war for an rts game, and planned it like this. (Unity 2020.2.7, URP 10.3.1)
Use units field of view to generate a texture of what is seen (alpha 0).
Create other ...
0
votes
1
answer
347
views
Bake a heightmap from Editor
I want to implement a heightmap-based water simulation algorithm in Unity. I know exactly how I would approach this in pure low-level C++ and OpenGL (and also Shadertoy), and most of it is ...
0
votes
0
answers
40
views
Rendertexture skips channels sometimes
When rendering a camera to a render texture (for a portal effect), it seems to under certain circumstances skip rendering the red channel entirely.
I cannot put my finger on why this might be ...
0
votes
1
answer
95
views
XNA configuration on legacy code
Background:
Our biomechanics and Advanced Surgical Technologies Lab wrote a surgery navigation system desktop application in C# around ten years ago. One of its major functions uses XNA Game Studio 4....
0
votes
0
answers
224
views
Knowing the size of a framebuffer when rendering transformed meshes to a texture
I have a couple of 2D meshes that make a hierarchical animated model.
I want to do some post-processing on it, so I decided to render this model to a texture, so that I could do the post-processing ...
0
votes
0
answers
57
views
Per-component Shader Blend in Unity
Context :
I'm writing a 2D mobile game in Unity where the graphics are essentially black lines drawn on a background image plus some lighting. Running full RGB calculations for every step seems like a ...
0
votes
0
answers
76
views
coloured 3d models rendering issue while running on android
I am using Godot 3.2.2 stable (GLES2) along with kenney 3d nature asset pack (glb) for prototyping a 3d game. Everything works just fine on my desktop computer, but when I deploy the game to my ...
2
votes
0
answers
53
views
How to generate a star onto a render texture with spherical warping
How would one proceduraly generate a star in a compute shader that looks like one of thes two at any size needed. Also any way transfer this into a spherical map, would be appreciated.
Goal is to ...
1
vote
0
answers
223
views
Shadowmapping with multiple light sources
I am using shadow-mapping to add shadows to my world.
Currently, I use one lightsource, which means I have to draw my world twice: once in the lightview, once in the camera view.
I want to add more ...
1
vote
1
answer
138
views
How to use WorldToScreenPoint function in a texture context?
I am rendering a scene into a RenderTexture and I have a set of 3D points. I want to convert these points from 3D to texture coordinate frame. It worked, when I rendered into screen and used ...
0
votes
1
answer
3k
views
How to convert depth values into Unity's distance
I am new in Unity and now only studying for my work project. I need help with computing real distances from depth values. Can't figure it out.
My shader is:
...
0
votes
1
answer
2k
views
How to capture image from camera with post effects? Mysteriously only get emission(?) pass
I have a separate camera from my main camera, whose purpose is to take screenshots, or render a "live feed" of the action, at different angles. Hierarchy as such:
The game object labeled ...
1
vote
1
answer
17
views
Unity: Render 1st Texture to 2nd Texture
I want to pass the first texture through a shader and render it to a second texture.
The actual task is bit more complicated, as I then want to render the second texture back to the first texture ...
0
votes
0
answers
785
views
Unity: Dimensions of color surface does not match dimensions of depth surface
I am receiving the error, "Dimensions of color surface does not match dimensions of depth surface" whenever I attempt to use my screenshot code, without any callstack or anything further insight of ...
1
vote
1
answer
2k
views
dx11 Rendering to target texture shows only clearcolor(ImGUI-Custom Game Engine)
Im trying to create a game view for my game engine using ImGui framework,however when i try to render texture,there is only clear color displayed on the screen.
My plan
Creating Render Target ...
0
votes
0
answers
46
views
Low resolution RenderTexture with gradients
I have a small RenderTexture that stretched on large object, so texels is near 0.3 of unit. Source for this texture has much more resolution and with gradients.
If source little bit changes its ...
0
votes
2
answers
859
views
Rendering to Texture with Transparency in Monogame?
Please forgive me if I'm asking a question that has been answered before, but for the life of me, search as I might, I couldn't find a problem exactly like this anywhere.
I'm trying to render a ...
1
vote
1
answer
678
views
Video feedback effect with recursive RenderTextures in Unity 2018.3
I have a project where I'm playing with a video feedback effect by rendering a camera to a RenderTexture and pointing the camera at a quad displaying that RenderTexture.
This works great normally, ...
2
votes
1
answer
249
views
Dr.Strange's door in Unity3D, how to put a projected void on a plane?
My question is about a visual trick I would like to perform in Unity3D. I want the player to walk outside a door and see no walls of the room behind them, just the door. They should still be able to ...
1
vote
0
answers
589
views
Unity blit() not writing to RenderTexture
I found a nice Gaussian Blur shader online and am attempting to use it to blur a render texture using blit(). However, the render texture remains unblurred. I know for a fact the blur shader works as ...
0
votes
1
answer
333
views
How can I pack repeated textures into one texture efficiently?
I have an obj mesh with some textures, several of them are repeated(uvs are not within [0,1]). I'd like to merge all those textures into one texture and transform the uvs of obj.
1
vote
0
answers
1k
views
Is it possible to crop a render texture in unity?
Basically what I want to do is, take the source render texture from OnRenderImage and crop it (continuously). I've already achieved this by using ...
1
vote
2
answers
331
views
Combining multiple diffuse textures into one leaves strange distortions?
I made 3 models, each has own material. And after texture painting, I combined each their texture to single textures for optimization.
Currently making Mobile Game with Unity 2018 and using Mobile/...