Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

HTML Problems

A topic by Klehrik created Apr 13, 2020 Views: 470 Replies: 6
Viewing posts 1 to 2
Could not compile fragment shader:

ERROR: 0:51: 'i' : Loop index cannot be initialized with non-constant expression

Developer

When you compile your project for HTML, you need to remove the non-HTML shaders from the project.  If you don't, they try to compile and will throw errors.

Deleted 3 years ago
Developer(+1)

I've never seen that error...  You fully removed the non-html shader file from the project?  Not just deleted the code out of it?  Try cleaning your project (the little brush icon near the debug button)

Deleted 3 years ago
Developer

No worries!  Glad you got it working!

Im having problems with this. I have started a new project, slowing importing things, and I only have shd_pal_swapper, shd_pal_html_sprite, and shd_pal_html_surface as shaders, and I need all 3 to run this on html5, no?

Any help is greatly appreciated, thanks!

Developer

No, you don't need the first one.  Just the ones labeled HTML.  In fact, if you build for HTML with the non-html shader in your project, there's a good chance the game will yell at you.  You'll have to remove it from your project completely because Yoyo doesn't allow you to specify assets per export, unfortunately.

Ok thanks for the help :)