12 votes

Can I just convert everything in godot to C#

The Godot C# documentation provides an incomplete list of the API differences between C# and GDScript. There are some difference in the methods & properties names. Additionally, some things in C# ...
Pikalek's user avatar
  • 12.2k
11 votes

Can I just convert everything in godot to C#

Pikalek answer is correct. I'll expand a bit about the performance and the translation process. I want to point out that C# will give you more optimization avenues than GDScript, because C# has typed ...
Theraot's user avatar
  • 26.2k
9 votes
Accepted

How to increase Godot render distance?

As you found out the Editor far distance can be changed in the Viewport Settings (which you access via View -> Settings...). But that is just for the editor. For the running game, use the the ...
Theraot's user avatar
  • 26.2k
7 votes
Accepted

Calculated normals for mesh not working

vec3 norm = vec3(uViewMatrix * uModelMatrix * aNormal); The normal cannot be transformed like a point, to transform a normal you use the inverse transpose matrix. If you want the fun details of why ...
Tim's user avatar
  • 601
4 votes
Accepted

Why is my texture wrong?

See if you can fix this by flipping V coordinate of the UV map: V = 1 - V It is very common that UV gets vertically flipped in different programs/engines. Also ...
Kromster's user avatar
  • 10.6k
4 votes

Indexed draw vs draw array

It depends. Using glDrawElements requires an index buffer which is an extra, but does allow for removal of duplicate vertices, concatenation of primitives and reuse of vertices via the hardware ...
Maximus Minimus's user avatar
4 votes

OpenGL ES 2.0 Shadow Mapping - depth only FBO not working due to GL_FRAMEBUFFER_INCOMPLETE_ATTACHMEN

You will need to implement multiple alternative solutions depending on the GPU. Not only are there many choices (GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT32, ...
Stephane Hockenhull's user avatar
3 votes

When which type of draw mode to use?

First, here's an image to help visualize what we're taking about: And some explanation: GL_TRIANGLES: You send distinct triangles to draw, with each 3 coordinates ...
Raziel Anarki's user avatar
3 votes
Accepted

How to know when Android OpenGL Context has been preserved?

If you require specific behavior, your best option is to use a plain SurfaceView rather than a GLSurfaceView. GLSurfaceView is just a SurfaceView subclass that handles threading and EGL context ...
fadden's user avatar
  • 381
3 votes

What's the best practice for a progress bar in OpenGL ES 2.0?

No need to bring in additional entities, KISS Just render the progress bar out of three parts - left cap, right cap and the body. Schematic: ...
Kromster's user avatar
  • 10.6k
3 votes

Removing texture wrapping artifacts in OpenGLES

I figured out what was going on. The problem was not floating point precision, and not that I needed to make my own mipmaps to blend each level correctly. There were actually 2 problems: I was ...
AldaronLau's user avatar
3 votes
Accepted

Puting all vertex attributes of a scene into a single VBO

You were calculating the starting offsets into the buffer to render from incorrectly. The byte offset used is pointer + first * <...
Alex - GlassEditor.com's user avatar
3 votes
Accepted

Godot 3.1.2: Black lines / borders around Sprite

Edit: To remove the border around the sprite turns out there is an option in the Import Menu for the asset. In this menu change the Repeat Flag Setting to Disabled. Make sure to Reimport the asset ...
DominoDev's user avatar
  • 126
3 votes

lag spikes and low fps

Before I start, a note on terminology: I'll be calling "agent" to any non-player entity that does things in the world. They include enemies, but the term "agent" is not limited to ...
Theraot's user avatar
  • 26.2k
2 votes

Generate ETC2 compressed texture from Android Bitmap in OpenGL ES 2

Note that while GLES3 mandates ETC2 support, it doesn't mandate that it saves any memory on the graphics card. A lot of implementations that support it simply decompresses the texture in software and ...
Adam's user avatar
  • 7,346
2 votes

Opengles 2.0, Replace the black region in the image to make it transparent

There is noise introduced in your texture due to compression which causes some of the pixels to not be perfectly black. You need to add an error threshold to your comparison, fastest way is to use a ...
Stephane Hockenhull's user avatar
2 votes
Accepted

Pitch/Yaw in circle causes undesired Tilt

You're using the previous value of the up vector to update the right vector and the up ...
DMGregory's user avatar
  • 134k
2 votes
Accepted

OpenGL ES 2.0 Without The Use of Shaders

OpenGL ES 2.0 requires you to provide a set of shaders (vertex and fragment). Those examples use the old shader-less OpenGL ES. For an introduction use the old GLES1. Make sure you can draw ...
Stephane Hockenhull's user avatar
2 votes
Accepted

Best way to add and remove quads in a VBO?

You don't need a dictionary for this, just use an infinite array (c++ - vector, java - arraylist, c# - list) and store an id in the order they can be found in the vbo. If you want to remove one of ...
Bálint's user avatar
  • 14.9k
2 votes

OpenGL: Does it make sense to use an Index Buffer With GL_TRIANGLE_FAN?

It could possibly make sense if you try to draw something like a huge polygon, or some sort of sphere, where the edges connect. This is really inefficient, since the index buffer is most probably ...
Dynamitos's user avatar
  • 144
2 votes
Accepted

Aligning a weapon model with a first-person camera

One old trick for FPS games is that the player's weapon is rendered separately. What that means in practice is that you render your scene in (at least) two parts: first the world, then the player ...
congusbongus's user avatar
  • 14.8k
2 votes

Can ANGLE OpenGL ES 2.0 use the same color / depth surface as Direct3D11?

It would be possible to render to textures from either the ANGLE or Direct3D and then using that texture to produce the final content that is inserted in the FBO that is drawn on the screen. Read ...
George Hanna's user avatar
2 votes
Accepted

Unpacking Sprite Sheet Into 2D Texture Array

IIRC you can select a portion of the image using the various settings to gl.pixelStorei Here's some code that makes a 128x128x8 2D Array texture from a 512x256 2D ...
gman's user avatar
  • 840
2 votes
Accepted

Should I draw a button using a single shape (triangle list) and draw call, or multiple shapes and draw calls (triangle strip and line lists)?

No two GPUs render GL_LINES the same way. You can be missing pixels at some of the corners on one GPU/driver, missing different pixels on another GPU/driver. Have ...
Stephane Hockenhull's user avatar
2 votes
Accepted

GLfloat vs GLfixed vs GLint performance in 2017

There's a very nice throughput table here If you take a look at the rows containing the throughput of 32 bit integers and floats, you'll see, that the float throughput is either higher (in case of ...
Bálint's user avatar
  • 14.9k
2 votes
Accepted

glVertexAttribPointer alters completely different shader program

In OpenGL ES 2.0 a program object does not contain the vertex array state (which you are modifying in your question). That data is global, so it applies to whatever the current program is. The ...
bcrist's user avatar
  • 2,348
2 votes
Accepted

Issues making a gradient square in glsl es 2.0, Gamemaker Studio 2.0

Here's a WebGL implementation showing the same effect, which means it is the intended behaviour That's just an optical illusion, the line isn't there. Let me magnify the image: Your eye perceives ...
Bálint's user avatar
  • 14.9k
2 votes

Roads rendering over 3D terrain

An alternative to incorporating the roads into your terrain texture is to model them as separate geometry, for example as triangle strips. The problem with that is you want the road geometry to be ...
Craig Reynolds's user avatar
2 votes

GLSL shader time uniform freezed?

It sounds like your noiseTex you're looking up into might be configured with wrapping mode CLAMP_TO_EDGE - once your ...
DMGregory's user avatar
  • 134k

Only top scored, non community-wiki answers of a minimum length are eligible