Skip to main content

Questions tagged [webgl]

WebGL is a Javascript API for rendering interactive 3D / 2D graphics on the HTML5 canvas element. It is based on OpenGL ES 2.0.

Filter by
Sorted by
Tagged with
2 votes
2 answers
3k views

I'm developing a top-down 2D tile-based canvas game. I have a single sprite sheet of all my tiles, and then a JSON tile map array of where they're placed. Previously I would render all the layers of ...
Ryan Peschel's user avatar
0 votes
1 answer
728 views

I developed a multiplayer FPS using WebGL, Nodejs and WebSockets. So far it is running great. I am currently using setInterval(sendPlayerPositions, 16); to send updates to WebGL clients. Ideally I ...
Ray Hulha's user avatar
  • 103
0 votes
1 answer
284 views

When I imported the FMOD plugin into a Unity WebGL project, then removed it afterwards, I wasn't able to build it due to errors about trying to copy an FMOD file: fmod_register_static_plugins.cpp ...
Ignis Incendio's user avatar
-1 votes
2 answers
576 views

Not sure why but the progress bar never moves for WebGL in Chrome, but the game downloads and works? Using Unity 2020.1.14f1 brotli WebGL builds
ina's user avatar
  • 294
0 votes
0 answers
1k views

My game has vertical aspect ratio and looks like this: When I press full screen button ...
Zagorodniy Olexiy's user avatar
0 votes
1 answer
1k views

Currently, we have a project that runs on Windows and uses an Excel spreadsheet to save/retrive some data/information. Now we want to build that project for WebGL. The problem is that file reading ...
Muhammad Faizan Khan's user avatar
7 votes
2 answers
2k views

Our game includes an in-game level editor. When the user saves a custom level, the level is serialized and written to a file: ...
Kevin's user avatar
  • 6,976
1 vote
1 answer
1k views

I created a game that, when I play it in Unity, looks like this: But when I build it in WebGL, the rightmost part of the screen (with the red player character in it) is truncated: Play it in-browser ...
Erel Segal-Halevi's user avatar
0 votes
0 answers
99 views

https://herbertjoseph.com There is a WebGL build in the background of this site, and it doesn't seem to laod on my iPad. I've asked a few people to visit and check it out, and some have said that the ...
Herbert Joseph's user avatar
1 vote
1 answer
2k views

I am building a 3D engine and have a rendering abstraction that focuses on writing shaders. Most my 3D shaders have gl_Position output like: ...
kevzettler's user avatar
1 vote
0 answers
315 views

What's a technique for snapping the mouse pointer to vertices in WebGL or OpenGL? All I need is the vertex position, no other info. Ideally, I'd like to do this without needing to keep positions and ...
xeolabs's user avatar
  • 147
0 votes
0 answers
86 views

I am making a game in JavaScript and rendering it to a WebGL canvas. To give the game some extra spice, I'd like to create filters (or perhaps they're called "Shaders?") to apply directly onto the ...
Eyesight Technology's user avatar
2 votes
0 answers
613 views

I created a ShaderMaterial to draw a box in three.js using the following key code: ...
samm's user avatar
  • 121
1 vote
0 answers
320 views

I have a WebGL app (built using Unity 2019) which I'm testing locally in Firefox and Edge. If the app is only running in a tab in Firefox, it runs at 25 - 50 fps and has noticeable stutter. If I run ...
Kevin's user avatar
  • 6,976
0 votes
0 answers
159 views

I have a shader that draws 2D quads from a texture atlas using instancing. I'd like to add a feature that allows me to map each of the RGBA channels in the texture using a 5x5 matrix. For example, the ...
Chris's user avatar
  • 121
0 votes
2 answers
773 views

Can someone provide me an explanation of how the lookAt matrix works? ...
user8380672's user avatar
0 votes
1 answer
785 views

I'm trying to implement variance shadow mapping in my engine. I'm using WebGL 2 and now I have only one directional light source. It's working, but it has a serious issue near the shadow edges and I ...
racz16's user avatar
  • 171
0 votes
0 answers
274 views

I am currently experimenting with rendering planetary scale terrain. I am generating the terrain on the GPU with noise, and to fix the 32 bit floating point precision problems, I generate the ...
Raouf's user avatar
  • 133
0 votes
1 answer
237 views

I using Unity 2019.2.14f1 to create a simple 3D game. I want to build the project for WebGL, but, even though the player has animations on Unity, in the web the Player doesn't have animations even ...
Gonçalo Peres's user avatar
0 votes
0 answers
989 views

I have written a fragment shader, on a shape which is a square made with gl.TRIANGLE_STRIP, and which displays a radar: To build the radar, I'm using distance from ...
anotherdev's user avatar
0 votes
1 answer
505 views

I have the following problem with a WebGL project I'm working on: I have an object which I want to zoom out and move to a specific position at the same time, for this, I've created a coroutine which ...
roseicollis's user avatar
0 votes
1 answer
2k views

I have an unusual scaling of UI Elements after my build in unity for WebGL Game in Unity Engine: Game in Itch.io: Has anyone seen this kind of behaviour? any suggestions on what I should look into? ...
Arman Haque's user avatar
0 votes
0 answers
86 views

I'm creating a cube in WebGL made of mirros that have to reflect the object inside of it. At the moment I'm stuck because I don't understand the correct logic to implement to achieve the result. I ...
keepyourweb's user avatar
-1 votes
1 answer
2k views

what is the problem with linear interpolation? in update() in case this is animate() and when I call zoomCamera() in update() there is lerp with smooth but when I call here ...
grzesiekmq's user avatar
1 vote
0 answers
299 views

I was trying to develop a simple drag and drop items for Web. What I was trying to do is to make the UI elements from web view to mobile view when the aspect ratio is changes. I need this web view ...
Sakuna Madushanka's user avatar
0 votes
1 answer
2k views

In my WebGL browser app, i've tried to add Post Processing (first version) stack. I'm using Unity 2018.4.6f1 (i started 1 years ago to develop this app). I've added Post Processing Behaviour to my ...
stighy's user avatar
  • 477
-1 votes
1 answer
526 views

In my blogger blog: https://cglabprojects.blogspot.com I have a newer blog post with <canvas width = "570" height = "570" id = "my_Canvas1"></canvas> ...
Som Pra's user avatar
  • 103
0 votes
2 answers
1k views

i'm trying to built my game, made in Unity 2018.3, and i'm trying to built it in WebGL, but the problem is this: built was succeeded, but the Folder is still Empty, and here is the problem occured: ...
Bhaswara Arizon's user avatar
1 vote
0 answers
1k views

In my WebGL Project here is the way for camera navigation (Movement/Rotation) on Update event: ...
Muhammad Faizan Khan's user avatar
0 votes
1 answer
958 views

I have to Load/Unload models from a specific URL based on player position. For this reason I am checking player position from model and then load/unload related piece of model in a ...
Muhammad Faizan Khan's user avatar
0 votes
1 answer
500 views

Trying to get the example code for CalcEyeFromWindow() (first one on the page) to work in WebGL, but having no luck. Paired down the code to the following with some explicit values just in case ...
cageyo's user avatar
  • 11
0 votes
1 answer
1k views

I need to download audio (OGG, Mp3 or wav) from URL and play it. In Editor is working fine, and also in stand alone build. But not in WebGL build. My Code: ...
stighy's user avatar
  • 477
1 vote
1 answer
6k views

I would like to know if there is a solution to copy/paste the text from/to an InputField in a WebGL Unity app. For security reasons, Unity WebGL doesn't allow text copy and paste in/from browser.
stighy's user avatar
  • 477
0 votes
0 answers
62 views

I'm currently creating a game where people get some kind of reports for their game performance on a website. Let's say, you log-in, play the game, the system gathers your performance data and this is ...
roseicollis's user avatar
0 votes
3 answers
2k views

I have a very large environment which I have to load/unload in unity Webgl as I can't load them at once. So, I have divide the environment into 1000 x 1000m (1km) (each chunk is consist of three layer ...
Muhammad Faizan Khan's user avatar
0 votes
1 answer
708 views

So I'm studying Webgl and after directional light I'm approaching point light. So I've seen two different approaches: Take the directional light (diffuse and specular components) and multiply them by ...
nkint's user avatar
  • 961
2 votes
2 answers
2k views

I am getting aw snap or sometime not enough memory problem when I reload my webgl page. I have a webgl project which is empty (just a camera + light), developed in unity3d. I am reloading it, and ...
Muhammad Faizan Khan's user avatar
0 votes
1 answer
212 views

I am trying to define the buffer data for WebGL and want to have in there something that encodes the fact that an object might be rotating. So it makes me think of angular momentum. So if you have ...
user10869858's user avatar
1 vote
0 answers
233 views

I am trying to wrap my head around how to take advantage of shaders for things like tweening. For example, there are these simple easing equations, which we can use like this: ...
user10869858's user avatar
0 votes
1 answer
809 views

Following along the answer here, it was mentioned about textures: They can also store things like velocities. For example, you can use a texture as a "flow field" for animating particles or other ...
user10869858's user avatar
0 votes
1 answer
201 views

I have been trying to figure out how to structure the VBOs in WebGL, and think that keeping them all together in one if at all possible sounds like the best approach. Right now I'm thinking of having ...
user10869858's user avatar
-1 votes
1 answer
159 views

I am trying to get a feel for how to structure WebGL/OpenGL apps and have been looking through sources for the types of buffers they use. I've found these: uvs occlusion noise bitangents tangents ...
user10869858's user avatar
1 vote
1 answer
5k views

I have a webgl program that sometimes renders textures, but mostly renders triangles or lines. When I am not rendering a texture, webgl gives the warning, "...
lmat - Reinstate Monica's user avatar
0 votes
1 answer
1k views

I'm currently trying to generate a really large procedural terrain in WebGL. I use a quadtree for LOD and plan to generate 1 heightmap for each quadtree node (terrain patch). The heightmaps are ...
EnhancedElegance's user avatar
15 votes
4 answers
6k views

When I read doc on webGL or OpenGL there can be seen some patterns in how names of functions and objects are used. But I can't understand the difference between buffer object and an array. There are ...
coobit's user avatar
  • 291
3 votes
3 answers
2k views

In January Notch tweeted about WebGL 2: WebGL 2 is happening. Bye, compatibility! Hello, 3d textures and pixel buffers! oh god it's got free vertex indices in the shader. That is basically a geometry ...
JoJnr's user avatar
  • 33
0 votes
1 answer
231 views

As can be seen from the Facebook's official Docs It says that To have both a Gameroom and a Facebook Web Game, you should leave your Facebook Web Games URL (https) unchanged. For example, https://...
Adnan Nazir's user avatar
1 vote
0 answers
196 views

I'm trying to generate a real-sized planet with WebGL. After researching, I came to the conclusion that the best way to get around 32-bit float precision issues (since GPUs don't support double ...
EnhancedElegance's user avatar
0 votes
2 answers
1k views

I have a simple sphere exported from 3DS Max in .obj format. I noticed that I have more UVs than vertices. I parsed the file with a simple program I wrote and then I put the various vertices and UVs ...
Paul's user avatar
  • 165
1 vote
2 answers
2k views

I know this issue maybe repeated and seems to be very common but I searched first and did not find anything concrete. I am doing some test and playing around with pixijs. I created an stage 320x180 ...
salc2's user avatar
  • 141