Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / How many images per object? GameGuru is showing 9 texture slots in its shader (dnTerrain)

Author
Message
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 22nd Jan 2019 04:10 Edited at: 22nd Jan 2019 04:11
The shader is using texture8(starts at texture0)... well technically its remarked out. I am wondering if we have received an upgrade from 8 images or was this just an oversight?
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 24th Jan 2019 08:47
Quote: "The shader is using texture8(starts at texture0)... well technically its remarked out. "

Its prob just a typo

by default AppGameKit uses from 0 to 7, 8 texture slots in total but there is a work around for texturing an object for example
with up to 256 textures, puzzler achieved this with the use of memblocks I believe but it wont work for shaders.
fubar
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 24th Jan 2019 09:51
There's a work around for texturing up to 256 textures? You mean using an atlas, because there's no method is a shader. You use any memblock to set the UV coords for a triangle but that's not the same as setting multiple textures.
puzzler2018
User Banned
Posted: 24th Jan 2019 10:19
That's correct too. Image atlas to apply all the textures we require to one whole image and use uvs to assign to each texture on it

The way I remember doing it on meshmemblick was making use of neshindex and apply an image to the mesh index.

Using setobjectmeshomage comnand

I'll review this again soon when Minecraft gets nearer there cause not sure if it works like expected to be Frank
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 24th Jan 2019 14:01
You don't need to do this, especially in the Minecraft example. You just set the UV coords to locations in an image with multiple textures, you don't need multiple meshes. Still won't work with a shader though.
puzzler2018
User Banned
Posted: 24th Jan 2019 14:55
No no Minecraft will be done on a texture atlas. Will create a better texture generator to join different cubes types when I'm ready for that part.

Login to post a reply

Server time is: 2024-05-03 05:59:37
Your offset time is: 2024-05-03 05:59:37