Questions tagged [unity]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

Calculating texture UVs on world origin shift

I am using procedural tiling terrains for very large worlds, and to avoid floating point errors I'm periodically shifting all parent objects back closer to zero. The Unity terrains textures are ...
user avatar
0 votes
1 answer
68 views

Unity - custom shadow from sun

due to some features in materials I need to create my own directional shadow map. Everything seems to work ok, until the moment where I compare depths. First I add camera component to directional ...
user avatar
  • 556
3 votes
1 answer
98 views

Black squares in bloom effect

Good Morning! I'm having trouble rendering an on-screen bloom shader by post processing. Basically the shader works like this: Camera image before rendering the effect: First a filter is passed on ...
user avatar
0 votes
0 answers
48 views

Reorder mesh triangles

Good Morning! My problem is: I need to get the vertices of a mesh and send them to a shader. Inside the shader I will reassemble the mesh from its vertices. So far so good, I send the information and ...
user avatar
5 votes
2 answers
172 views

Rendering Hypercentric Perspective

I came across some Non-Euclidean Games which involve Hyperbolic Spaces, Spherical Spaces, Portals, etc. And, I noticed that they give quite deep feel of what Non-Euclidean Spaces feel like. So, I was ...
user avatar
0 votes
0 answers
117 views

Mapping an image from one camera pose to another given a planar scene

I'm trying to map an image of a 3D object to another one from a different camera position. My assumption is that the pose change between two cameras is so small and the object is far enough from the ...
user avatar
0 votes
0 answers
37 views

Unity crashes when running path tracing

I'm studying path tracing, at the moment I created a compute shader that aims to calculate the intersection of rays with meshes. However, when I run the code the unity crashes, displaying a graphics ...
user avatar
0 votes
0 answers
48 views

Unity path tracing makes the pc crash

Good Morning. I'm testing Path Tracing techniques with unity, following this tutorial. http://three-eyed-games.com/2019/03/18/gpu-path-tracing-in-unity-part-3/ But I'm in trouble. Whenever I try to ...
user avatar
1 vote
0 answers
190 views

Combine box shadow with a signed distance field

I'm using 2d signed distance fields in my current project for drawing shapes (example: https://www.shadertoy.com/view/4llXD7) and I want to add drop shadows to them. At first I thought I could exploit ...
user avatar
  • 111
2 votes
0 answers
50 views

Per-object screen space uv issue

I am currently trying to sample a texture in screen space. This works well : ...
user avatar
  • 1,169
2 votes
0 answers
663 views

Groupshared memory and parallel reduction over multiple kernel dispatch

I am doing some parallel reduction and mostly following these nVidia slides. However they are not very detailed in places or I might be missing/misunderstanding something. Edit 2: While I figured ...
user avatar
2 votes
1 answer
1k views

Sharing memory between compute shader and pixel shader

I am relatively new to compute shaders and gpgpu in general so bear with me if i am missing the point somewhere. The main thing i do not yet understand / see is how to get memory from a compute ...
user avatar
0 votes
0 answers
125 views

Problem with Quad-based Tessellation in GLSL generating incorrect vertex ordered tessellation

I am trying to perform quad-based tessellation using GLSL on Unity to be able to render polynomial-based parametric surfaces on a Unity quad. The quad-based tessellation using GLSL seems to be ...
user avatar
0 votes
1 answer
194 views

What is performance better - add four materials to mesh or duplicate every vertex and use packed texture?

I am making ski jumping game (in Unity) with procedurally generated hill mesh. I want to add lines on hill like this (mesh is created by script, but I've manually assigned materials in Blender) ...
user avatar
0 votes
1 answer
351 views

Unity: Pass texture pointer from OpenGL to Unity

I'm working on a scene in Unity where I have textures loaded at runtime. As a result of that, the scene is being slowed down (even with co-routines), so I thought maybe I could move the texture ...
user avatar
  • 3
2 votes
1 answer
147 views

Why can I see the diffuse lighting effect on a perfect mirror?

Currently I am learning PBR by Unity3D. I find that even I turn the smoothness to 1, I can still see the diffuse lighting effect, which does not make any sense to me. Imagine I trace a ray from my ...
user avatar
5 votes
1 answer
1k views

Benefits of Clustered Shading vs Tiled Shading?

The Unity Engine manual page Best Practice: Setting up the Lighting Pipeline has a section "Render pipelines" with an illustration of Tile Rendering and Cluster Rendering: The section then mentions:...
user avatar
  • 1,689
6 votes
1 answer
150 views

Bitmap-images or SVG

I'd like to create a GUI in my first Unity-game (2D). I want my GUI appear sharp in all resolutions (e.g. 1920x1200 or 3840x2160). The problem I am facing now is that I don't know if I should save my ...
user avatar
  • 163
4 votes
1 answer
1k views

Non real-time rendering on Unity3D

I made an audio visualizer using Unity3D (you can see it here) but I am not satisfied on the video quality, as the compression destroys the graphics. I recorded the screen during a real-time rendering....
user avatar
1 vote
1 answer
146 views

Difference between using + and * operator after tex2D to add albedo color?

I have a two different codes with a little difference Case 1. I used a + operator before _myColor. ...
user avatar
2 votes
1 answer
1k views

How can I use 3d animation to create a character that uses sign language?

I performed a quick search on programs that translate natural language to sign language (through a 3D animation character). Here are examples: IBM SISI ProDeaf (which is an android app) My question ...
user avatar
2 votes
1 answer
235 views

DX9 Shadow map PCF issue

I am trying to do simple PCF with Unity but I am facing some issues and I don't know where they come from. If anybody has an idea... Here are two examples ...
user avatar
  • 1,169
6 votes
1 answer
641 views

Dealing with blown-out highlights in PBR

I've been writing some custom shaders based around Unity's Standard BRDF, which is uses GGX distribution term and Smith visibility term. It looks great at either end of the smoothness scale (1 and 2 ...
user avatar
  • 2,302
1 vote
0 answers
421 views

Streaming video camera input from WebCamTexture on mobile? (Possibly via WebRTC or websocket?)

I'm building an application where I stream video camera feed from one mobile device to another in Unity. I tried searching for answers, but most of the topics deal with how to display a video stream, ...
user avatar
4 votes
1 answer
7k views

Alpha blending between two overlapping semi-transparent shapes

I am working on a 2D lighting system for my game. My approach has been to: Create a transparency quad representing 'darkness'. Create a stencil shader for light sources to clip from the darkness quad....
user avatar
  • 141
2 votes
1 answer
557 views

GPU not reaching 100% usage when frame rate is dropping

I am making an iOS game using Unity. I am testing some shaders that I have made for the game, and in some cases the device will run at under 30 FPS but not have 100% device utilization. Sometimes a ...
user avatar
5 votes
1 answer
713 views

How to convert decomposed transformations between different coordinate systems?

I am converting some Unity3D scenes to a proprietary json format to be used by my OpenGL renderer that uses a different coordinate system from Unity's. I have multiple sets of {translation, rotation(...
user avatar
  • 101
7 votes
1 answer
2k views

What's the difference between Sample and tex2D

I am mainly using Unity but I think that it's not related to this engine, and I am wondering what's the difference between using tex2D and ...
user avatar
  • 1,169
2 votes
1 answer
88 views

What is required to limit the amount of draw calls in Unity?

I would like to limit the amount draw calls to approximate performance. Is there a nominal amount to aim for when working with high performance gaming? From my understanding to render an object that ...
user avatar
  • 31
4 votes
1 answer
3k views

How could I use bent normal map

This might be a general question but I have some difficulties about understanding baked bent normal maps and how to use it inside a shader in Unity. From what I understand, bent normals are ...
user avatar
  • 1,169