Search the Community
Showing results for tags 'RGB'.
Found 4 results
Hello ! As WebGL2 comes with new texture formats, I decided to play a bit with them, and it seems to work well in pure WebGL2: https://playground.babylonjs.com/#RBQYSP (If it prints red, that means the RGB texture did work 🙂) I saw texture format has been added to createRenderTargetTexture function so I wanted to try it out. But whatever I do, I never achieve to create a RGB Render Target Texture. 😥 This code works to create a RGBA RenderTarget: https://playground.babylonjs.com/#RBQYSP#5 This code fails to create a RGB RenderTarget: https://playground.babylonjs.com/#RBQYSP#6 Framebuffer is incomplete. I already pulled the last version of BJS and added gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1) everywhere but it doesn't help much. I'm struggling with this, I don't understand where something is different from the pure WebGL2 version. I verified InternalSizedFormat, InternalFormat and TextureType and they're OK. If anybody has an idea... Thanks in advance 😊 PeapBoy
Hello there! This year I've discovered the js13kgames competition and I've decided to find some time and give it a try! It has been really challenging and I've learned a lot! Unluckily I've discovered the competition a little bit late so I've just had like a week to create my game but in the end I managed to do it in time 2015's theme was "Reversed" so I've decided to create something a little bit crazy, and pretty hard to play: a fast paced survival space shooter in which enemies have the same color of the background. You will have to reverse the background color to reveal hidden enemies, avoid their bullets and survive! It is mobile compatible and here's how to play: - Desktop: arrow keys to move, spacebar to reverse background color. M to toggle mute. - Mobile: tilt device to move, tap to reverse background color. You can play Reverse Ground Battle here: http://js13kgames.com/games/reverse-ground-battle/index.html Here's the source code on GitHub: https://github.com/MattiaFortunati/Reverse-Ground-Battle And here's a screenshot: It was my first time using jAllegro and bfxr really saved my time! I had some issues with mobile browsers compatibility but in the end I managed to create this little game with great fun and satisfaction! I'll just leave this here in case you want to play some unusual game, while hoping that the source code can be helpful, too! Have Fun!
Hi there, I'm literally brand new to WebGL and BabylonJS ( although already a programmer and 3d artist ), but having a lot of fun learning it, great job on the engine/api so far guys. What i'm trying to figure out, is if there is a way to discover the rgb texture value where the mouse has been clicked.. Having a look at PickingInfo, it looks as though getTextureCoordinates() might be used to read the position on a bitmap texture for example ( just wild theories at this point of course ), although i can see no way to access the rgb data of a bitmap or texture object anywhere in the Babylon API. Any idea if this might be possible? Basically what i'm trying to achieve is - i have an object, with a texture on it, and i would like the user to be able to click on different parts of the object to make stuff happen. So i was thinking, if the texture had say a blue area, the user clicks on the blue, it does something, they click on a red part, it does something else.. The other more obvious way i think to achieve this would be to either break the object up into separate clickable meshes and go from there, or have invisible hotspot meshes that detected clicks in specific areas.. But i just wanted to try and figure out if this would be possible. Texture hotspots based on colour would be a handy thing to have for general interactivity..
Hello ! I know it is possible for a sprite (with sprite.tint) but how can it be done with a particle ? I saw this: http://examples.phaser.io/_site/view_full.html?d=particles&f=particle+class.js&t=particle%20class But I don't understand :-( Thank you in advance.