Questions tagged [viewport]
An area (typically rectangular) expressed in rendering-device-specific coordinates, e.g. pixels for screen coordinates, in which the objects of interest are going to be rendered
125 questions
1
vote
1
answer
40
views
Move mouse from one viewport to another
I am currently implementing a map editor for a 2D platformer and run into trouble with my viewport and mouse movement.
I have two viewports: one main viewport in the top 2/3 of the screen which has a ...
0
votes
1
answer
161
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
1
answer
394
views
How to use Subviewports to render a texture for Sprite3D?
Godot 4.2
Background:
In my game prototype, I have a following player entity:
Paperdoll2D has a script that dynamically adds the weapon/armor/etc Sprite2D nodes to the main sprite to "dress-up&...
0
votes
0
answers
353
views
Viewport blurry when playing as character
In Unreal Engine 5, whenever I run the game, the viewport becomes very blurry with strange artifacting and twitching. This only happens when I'm attached to the player controller. If I eject from it, ...
0
votes
0
answers
78
views
Is it possible to activate/deactivate depth writes in geometry shader?
I'm trying to achieve rendering to multiple targets with multiple viewports. Currently it does not work possibly because I have a single depth buffer so a first write to it with a specific viewport ...
3
votes
1
answer
2k
views
How do I render a pixel art game in a modern (scalable, smooth, crisp, hdpi friendly) way with Godot?
In modern pixel art games, one will usually find the following features:
dpi agnostic: Having an HDPI screen does not mean the game is tiny.
"large" pixels: Game-pixels are big, made up of ...
1
vote
1
answer
139
views
How to render picture-in-picture effect with libGDX camera
libGDX cameras are mostly used for layered rendering with different "world unit size," but I wonder is there a way of showing the view of for example a libGDX Orthographic camera in the ...
0
votes
1
answer
64
views
Viewport offset from top also creates a gap at the bottom
I am trying to do something really basic with sf::View.
On a 1280x720 pixel window. I need to place a viewport which is 560x560 with a 160px gap from the top.
What ...
0
votes
0
answers
392
views
Setting glOrtho and glViewport so top-left of window has coordinates (0,0)
I haven't used OpenGL for a long time and have trouble setting up a 2D screen where the upper left window coordinates are (0,0) and the width and height of the ...
0
votes
1
answer
90
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 ...
1
vote
2
answers
1k
views
How to make a collision object within a viewport detect mouse inputs?
I am working on a 2D game with a spatial node (a 3d node) inside a viewport.
Nodes within the viewport should be able to detect user input from what I can find online, but for some reason it doesn't ...
1
vote
0
answers
153
views
Drawing angle between 2 rays
Currently, we can draw rays in real time, like this:
...
2
votes
1
answer
655
views
Spritesheet with unstable width
I'm working on my 2d game engine using HTML5 and Canvas. I have a sprite sheet, and each frame of this sprite sheet has its own size.
Considering that the Viewport is following this sprite sheet (in ...
0
votes
1
answer
477
views
Calculating view matrix from rotation, elevation and location
I have the rotation(A), elevation(B) and location(C) of a camera in a left handed 3d space. +...
3
votes
1
answer
2k
views
How to access a ViewportTexture's depth data as an image?
I make use of ViewportTextures, kind of like rendering security cameras on screens. Now, I'd need to access the depth textures to do some comparison of images / pixels. How do I access the depth data ...