From 832d8c9764c6ebcaf1ddba42095729c30a5c5cf1 Mon Sep 17 00:00:00 2001 From: Michael McMullen <811123+michael-mcmullen@users.noreply.github.com> Date: Fri, 5 Jul 2024 00:41:38 -0400 Subject: [PATCH 1/4] Update Shade.gml Moved sprite_get_texture to inside thus minimizing the shade code applyTexture("s_grass", spr_grass); or applyTexture("s_grass", spr_grass, 0); --- Shade/scripts/Shade/Shade.gml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shade/scripts/Shade/Shade.gml b/Shade/scripts/Shade/Shade.gml index cedaa0f..b5e4ba2 100644 --- a/Shade/scripts/Shade/Shade.gml +++ b/Shade/scripts/Shade/Shade.gml @@ -74,13 +74,13 @@ function __buildShade(shd) constructor { samplers[$ sampler_name] = shader_get_sampler_index(shader, sampler_name); } - static applyTexture = function(sampler_name,texture){ + static applyTexture = function(sampler_name,texture,subimg=0){ if(__currentShade != name){ return -1; } if(!variable_struct_exists(samplers,sampler_name)){ loadSampler(sampler_name); } - texture_set_stage(samplers[$ sampler_name], texture); + texture_set_stage(samplers[$ sampler_name], sprite_get_texture(texture, subimg)); } From 5a4693289d284e52139dd890d8f7ed91a1b4cd1f Mon Sep 17 00:00:00 2001 From: Michael McMullen <811123+michael-mcmullen@users.noreply.github.com> Date: Fri, 12 Jul 2024 12:49:21 -0400 Subject: [PATCH 2/4] Using full words instead of just "Uni" --- README.md | 17 ++- Shade/Shade.yyp | 63 ++++---- Shade/objects/obj_shadeTest/obj_shadeTest.yy | 62 ++++---- Shade/options/android/options_android.yy | 81 ++++++++++ Shade/options/html5/options_html5.yy | 35 +++++ Shade/options/ios/options_ios.yy | 49 ++++++ Shade/options/linux/options_linux.yy | 46 +++--- Shade/options/mac/options_mac.yy | 68 +++++---- Shade/options/main/options_main.yy | 39 ++--- Shade/options/operagx/options_operagx.yy | 43 ++++-- Shade/options/tvos/options_tvos.yy | 31 ++++ Shade/options/windows/options_windows.yy | 66 ++++---- Shade/rooms/Room1/Room1.yy | 96 ++++++------ Shade/scripts/Shade/Shade.gml | 18 +-- Shade/scripts/Shade/Shade.yy | 18 ++- Shade/shaders/shd_test/shd_test.yy | 16 +- Shade/sprites/Sprite1/Sprite1.yy | 151 +++++++++++-------- 17 files changed, 570 insertions(+), 329 deletions(-) create mode 100644 Shade/options/android/options_android.yy create mode 100644 Shade/options/html5/options_html5.yy create mode 100644 Shade/options/ios/options_ios.yy create mode 100644 Shade/options/tvos/options_tvos.yy diff --git a/README.md b/README.md index ccb500c..5e19458 100644 --- a/README.md +++ b/README.md @@ -20,18 +20,18 @@ This is the same as using shader_set() and then using shader_reset(), nothing mu # Uniforms -Every Shade element stores a list of uniform ids, and you have full control on which are loaded with `loadUni(* uniform name *)`, -to apply a value to an uniform, you then use `applyUni(* uniform name *, * value *, [variable type])`
+Every Shade element stores a list of uniform ids, and you have full control on which are loaded with `loadUniform(* uniform name *)`, +to apply a value to an uniform, you then use `applyUniform(* uniform name *, * value *, [variable type])`
``` -myShade.loadUni("u_time"); +myShade.loadUniform("u_time"); -myShade.applyUni("u_time", current_time, UniTypes.f); +myShade.applyUniform("u_time", current_time, UniTypes.f); ``` -`loadUni()` is not necessary since `applyUni()` will load the uniform id if it wasn't loeaded before, but you can use it if you want. +`loadUniform()` is not necessary since `applyUniform()` will load the uniform id if it wasn't loeaded before, but you can use it if you want.
- ### UniTypes list + ### UniformTypes list * f - float * f_array - float array @@ -44,9 +44,10 @@ myShade.applyUni("u_time", current_time, UniTypes.f); # Samplers - Samplers / textures work the same way as uniforms, but instead use `loadSampler(* sampler name *)` and `applyTexture(* sampler name *, * texture *)`
+ Samplers / textures work the same way as uniforms, but instead use `loadSampler(* sampler name *)` and `applyTexture(* sampler name *, * texture *, * image index *)`
``` myShade.loadSampler("s_grass"); - myShade.applyTexture("s_grass", sprite_get_texture(spr_grass,0) ); + // use the spr_grass sprite on index 1 + myShade.applyTexture("s_grass", spr_grass, 1); ``` diff --git a/Shade/Shade.yyp b/Shade/Shade.yyp index 3e1f9a1..f24a544 100644 --- a/Shade/Shade.yyp +++ b/Shade/Shade.yyp @@ -1,41 +1,38 @@ { - "resourceType": "GMProject", - "resourceVersion": "1.6", - "name": "Shade", - "resources": [ - {"id":{"name":"obj_shadeTest","path":"objects/obj_shadeTest/obj_shadeTest.yy",},"order":0,}, - {"id":{"name":"Shade","path":"scripts/Shade/Shade.yy",},"order":11,}, - {"id":{"name":"Sprite1","path":"sprites/Sprite1/Sprite1.yy",},"order":3,}, - {"id":{"name":"shd_test","path":"shaders/shd_test/shd_test.yy",},"order":2,}, - {"id":{"name":"Room1","path":"rooms/Room1/Room1.yy",},"order":1,}, + "$GMProject":"", + "%Name":"Shade", + "AudioGroups":[ + {"$GMAudioGroup":"","%Name":"audiogroup_default","name":"audiogroup_default","resourceType":"GMAudioGroup","resourceVersion":"2.0","targets":-1,}, ], - "Options": [ - {"name":"Linux","path":"options/linux/options_linux.yy",}, - {"name":"macOS","path":"options/mac/options_mac.yy",}, - {"name":"Main","path":"options/main/options_main.yy",}, - {"name":"Windows","path":"options/windows/options_windows.yy",}, - {"name":"operagx","path":"options/operagx/options_operagx.yy",}, - ], - "defaultScriptType": 1, - "isEcma": false, - "configs": { - "name": "Default", - "children": [], + "configs":{ + "children":[], + "name":"Default", }, - "RoomOrderNodes": [ - {"roomId":{"name":"Room1","path":"rooms/Room1/Room1.yy",},}, + "defaultScriptType":1, + "Folders":[ + {"$GMFolder":"","%Name":"Example","folderPath":"folders/Example.yy","name":"Example","resourceType":"GMFolder","resourceVersion":"2.0",}, ], - "Folders": [ - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"Example","folderPath":"folders/Example.yy","order":9,}, + "IncludedFiles":[], + "isEcma":false, + "LibraryEmitters":[], + "MetaData":{ + "IDEVersion":"2024.6.0.157", + }, + "name":"Shade", + "resources":[ + {"id":{"name":"obj_shadeTest","path":"objects/obj_shadeTest/obj_shadeTest.yy",},}, + {"id":{"name":"Room1","path":"rooms/Room1/Room1.yy",},}, + {"id":{"name":"Shade","path":"scripts/Shade/Shade.yy",},}, + {"id":{"name":"shd_test","path":"shaders/shd_test/shd_test.yy",},}, + {"id":{"name":"Sprite1","path":"sprites/Sprite1/Sprite1.yy",},}, ], - "AudioGroups": [ - {"resourceType":"GMAudioGroup","resourceVersion":"1.3","name":"audiogroup_default","targets":-1,}, + "resourceType":"GMProject", + "resourceVersion":"2.0", + "RoomOrderNodes":[ + {"roomId":{"name":"Room1","path":"rooms/Room1/Room1.yy",},}, ], - "TextureGroups": [ - {"resourceType":"GMTextureGroup","resourceVersion":"1.3","name":"Default","isScaled":true,"compressFormat":"bz2","autocrop":true,"border":2,"mipsToGenerate":0,"groupParent":null,"targets":-1,}, + "templateType":null, + "TextureGroups":[ + {"$GMTextureGroup":"","%Name":"Default","autocrop":true,"border":2,"compressFormat":"bz2","customOptions":"","directory":"","groupParent":null,"isScaled":true,"loadType":"default","mipsToGenerate":0,"name":"Default","resourceType":"GMTextureGroup","resourceVersion":"2.0","targets":-1,}, ], - "IncludedFiles": [], - "MetaData": { - "IDEVersion": "2022.8.0.34", - }, } \ No newline at end of file diff --git a/Shade/objects/obj_shadeTest/obj_shadeTest.yy b/Shade/objects/obj_shadeTest/obj_shadeTest.yy index 1a6d167..2995203 100644 --- a/Shade/objects/obj_shadeTest/obj_shadeTest.yy +++ b/Shade/objects/obj_shadeTest/obj_shadeTest.yy @@ -1,34 +1,36 @@ { - "resourceType": "GMObject", - "resourceVersion": "1.0", - "name": "obj_shadeTest", - "spriteId": null, - "solid": false, - "visible": true, - "managed": true, - "spriteMaskId": null, - "persistent": false, - "parentObjectId": null, - "physicsObject": false, - "physicsSensor": false, - "physicsShape": 1, - "physicsGroup": 1, - "physicsDensity": 0.5, - "physicsRestitution": 0.1, - "physicsLinearDamping": 0.1, - "physicsAngularDamping": 0.1, - "physicsFriction": 0.2, - "physicsStartAwake": true, - "physicsKinematic": false, - "physicsShapePoints": [], - "eventList": [ - {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,}, - {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, + "$GMObject":"", + "%Name":"obj_shadeTest", + "eventList":[ + {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, + {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, ], - "properties": [], - "overriddenProperties": [], - "parent": { - "name": "Example", - "path": "folders/Example.yy", + "managed":true, + "name":"obj_shadeTest", + "overriddenProperties":[], + "parent":{ + "name":"Example", + "path":"folders/Example.yy", }, + "parentObjectId":null, + "persistent":false, + "physicsAngularDamping":0.1, + "physicsDensity":0.5, + "physicsFriction":0.2, + "physicsGroup":1, + "physicsKinematic":false, + "physicsLinearDamping":0.1, + "physicsObject":false, + "physicsRestitution":0.1, + "physicsSensor":false, + "physicsShape":1, + "physicsShapePoints":[], + "physicsStartAwake":true, + "properties":[], + "resourceType":"GMObject", + "resourceVersion":"2.0", + "solid":false, + "spriteId":null, + "spriteMaskId":null, + "visible":true, } \ No newline at end of file diff --git a/Shade/options/android/options_android.yy b/Shade/options/android/options_android.yy new file mode 100644 index 0000000..7109120 --- /dev/null +++ b/Shade/options/android/options_android.yy @@ -0,0 +1,81 @@ +{ + "$GMAndroidOptions":"", + "%Name":"Android", + "name":"Android", + "option_android_application_tag_inject":"", + "option_android_arch_arm64":true, + "option_android_arch_armv7":false, + "option_android_arch_x86_64":false, + "option_android_attribute_allow_backup":false, + "option_android_build_tools":"", + "option_android_compile_sdk":"", + "option_android_device_support":0, + "option_android_display_name":"Created with GameMaker", + "option_android_facebook_app_display_name":"", + "option_android_facebook_id":"", + "option_android_gamepad_support":true, + "option_android_google_apk_expansion":false, + "option_android_google_cloud_saving":false, + "option_android_google_dynamic_asset_delivery":false, + "option_android_google_licensing_public_key":"", + "option_android_google_services_app_id":"", + "option_android_icon_adaptivebg_hdpi":"${base_options_dir}/android/icons_adaptivebg/hdpi.png", + "option_android_icon_adaptivebg_ldpi":"${base_options_dir}/android/icons_adaptivebg/ldpi.png", + "option_android_icon_adaptivebg_mdpi":"${base_options_dir}/android/icons_adaptivebg/mdpi.png", + "option_android_icon_adaptivebg_xhdpi":"${base_options_dir}/android/icons_adaptivebg/xhdpi.png", + "option_android_icon_adaptivebg_xxhdpi":"${base_options_dir}/android/icons_adaptivebg/xxhdpi.png", + "option_android_icon_adaptivebg_xxxhdpi":"${base_options_dir}/android/icons_adaptivebg/xxxhdpi.png", + "option_android_icon_adaptive_generate":false, + "option_android_icon_adaptive_hdpi":"${base_options_dir}/android/icons_adaptive/hdpi.png", + "option_android_icon_adaptive_ldpi":"${base_options_dir}/android/icons_adaptive/ldpi.png", + "option_android_icon_adaptive_mdpi":"${base_options_dir}/android/icons_adaptive/mdpi.png", + "option_android_icon_adaptive_xhdpi":"${base_options_dir}/android/icons_adaptive/xhdpi.png", + "option_android_icon_adaptive_xxhdpi":"${base_options_dir}/android/icons_adaptive/xxhdpi.png", + "option_android_icon_adaptive_xxxhdpi":"${base_options_dir}/android/icons_adaptive/xxxhdpi.png", + "option_android_icon_hdpi":"${base_options_dir}/android/icons/hdpi.png", + "option_android_icon_ldpi":"${base_options_dir}/android/icons/ldpi.png", + "option_android_icon_mdpi":"${base_options_dir}/android/icons/mdpi.png", + "option_android_icon_xhdpi":"${base_options_dir}/android/icons/xhdpi.png", + "option_android_icon_xxhdpi":"${base_options_dir}/android/icons/xxhdpi.png", + "option_android_icon_xxxhdpi":"${base_options_dir}/android/icons/xxxhdpi.png", + "option_android_install_location":0, + "option_android_interpolate_pixels":false, + "option_android_launchscreen_fill":0, + "option_android_lint":false, + "option_android_logcat":"yoyo:V DEBUG:V AndroidRuntime:V", + "option_android_minimum_sdk":"", + "option_android_orient_landscape":true, + "option_android_orient_landscape_flipped":true, + "option_android_orient_portrait":true, + "option_android_orient_portrait_flipped":true, + "option_android_package_company":"company", + "option_android_package_domain":"com", + "option_android_package_product":"game", + "option_android_permission_bluetooth":true, + "option_android_permission_internet":true, + "option_android_permission_network_state":false, + "option_android_permission_read_phone_state":false, + "option_android_permission_record_audio":false, + "option_android_permission_write_external_storage":false, + "option_android_proguard_minifying":false, + "option_android_proguard_shrinking":false, + "option_android_scale":0, + "option_android_screen_depth":0, + "option_android_sleep_margin":4, + "option_android_splashscreen_background_colour":255, + "option_android_splash_screens_landscape":"${base_options_dir}/android/splash/landscape.png", + "option_android_splash_screens_portrait":"${base_options_dir}/android/splash/portrait.png", + "option_android_splash_time":0, + "option_android_support_lib":"", + "option_android_sync_amazon":false, + "option_android_target_sdk":"", + "option_android_texture_page":"2048x2048", + "option_android_tools_from_version":false, + "option_android_tv_banner":"${base_options_dir}/android/tv_banner.png", + "option_android_tv_isgame":true, + "option_android_tv_supports_leanback":true, + "option_android_use_facebook":false, + "option_android_version":"1.0.0.0", + "resourceType":"GMAndroidOptions", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/Shade/options/html5/options_html5.yy b/Shade/options/html5/options_html5.yy new file mode 100644 index 0000000..513ff1d --- /dev/null +++ b/Shade/options/html5/options_html5.yy @@ -0,0 +1,35 @@ +{ + "$GMHtml5Options":"", + "%Name":"HTML5", + "name":"HTML5", + "option_html5_allow_fullscreen":true, + "option_html5_browser_title":"Created with GameMaker", + "option_html5_centregame":false, + "option_html5_display_cursor":true, + "option_html5_facebook_app_display_name":"", + "option_html5_facebook_id":"", + "option_html5_flurry_enable":false, + "option_html5_flurry_id":"", + "option_html5_foldername":"html5game", + "option_html5_google_analytics_enable":false, + "option_html5_google_tracking_id":"", + "option_html5_icon":"${base_options_dir}/html5/fav.ico", + "option_html5_index":"", + "option_html5_interpolate_pixels":true, + "option_html5_jsprepend":"", + "option_html5_loadingbar":"", + "option_html5_localrunalert":true, + "option_html5_outputdebugtoconsole":true, + "option_html5_outputname":"index.html", + "option_html5_scale":0, + "option_html5_splash_png":"${base_options_dir}/html5/splash.png", + "option_html5_texture_page":"2048x2048", + "option_html5_usebuiltinfont":true, + "option_html5_usebuiltinparticles":true, + "option_html5_usesplash":false, + "option_html5_use_facebook":false, + "option_html5_version":"1.0.0.0", + "option_html5_webgl":2, + "resourceType":"GMHtml5Options", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/Shade/options/ios/options_ios.yy b/Shade/options/ios/options_ios.yy new file mode 100644 index 0000000..b485954 --- /dev/null +++ b/Shade/options/ios/options_ios.yy @@ -0,0 +1,49 @@ +{ + "$GMiOSOptions":"v1", + "%Name":"iOS", + "name":"iOS", + "option_ios_build_number":0, + "option_ios_bundle_name":"com.company.game", + "option_ios_defer_home_indicator":false, + "option_ios_devices":2, + "option_ios_display_name":"Created with GameMaker", + "option_ios_enable_broadcast":false, + "option_ios_half_ipad1_textures":false, + "option_ios_icon_ipad_app_152":"${base_options_dir}/ios/icons/app/ipad_152.png", + "option_ios_icon_ipad_app_76":"${base_options_dir}/ios/icons/app/ipad_76.png", + "option_ios_icon_ipad_notification_20":"${base_options_dir}/ios/icons/notification/ipad_20.png", + "option_ios_icon_ipad_notification_40":"${base_options_dir}/ios/icons/notification/ipad_40.png", + "option_ios_icon_ipad_pro_app_167":"${base_options_dir}/ios/icons/app/ipad_pro_167.png", + "option_ios_icon_ipad_settings_29":"${base_options_dir}/ios/icons/settings/ipad_29.png", + "option_ios_icon_ipad_settings_58":"${base_options_dir}/ios/icons/settings/ipad_58.png", + "option_ios_icon_ipad_spotlight_40":"${base_options_dir}/ios/icons/spotlight/ipad_40.png", + "option_ios_icon_ipad_spotlight_80":"${base_options_dir}/ios/icons/spotlight/ipad_80.png", + "option_ios_icon_iphone_app_120":"${base_options_dir}/ios/icons/app/iphone_120.png", + "option_ios_icon_iphone_app_180":"${base_options_dir}/ios/icons/app/iphone_180.png", + "option_ios_icon_iphone_notification_40":"${base_options_dir}/ios/icons/notification/iphone_40.png", + "option_ios_icon_iphone_notification_60":"${base_options_dir}/ios/icons/notification/iphone_60.png", + "option_ios_icon_iphone_settings_58":"${base_options_dir}/ios/icons/settings/iphone_58.png", + "option_ios_icon_iphone_settings_87":"${base_options_dir}/ios/icons/settings/iphone_87.png", + "option_ios_icon_iphone_spotlight_120":"${base_options_dir}/ios/icons/spotlight/iphone_120.png", + "option_ios_icon_iphone_spotlight_80":"${base_options_dir}/ios/icons/spotlight/iphone_80.png", + "option_ios_icon_itunes_artwork_1024":"${base_options_dir}/ios/icons/itunes/itunes_1024.png", + "option_ios_interpolate_pixels":false, + "option_ios_launchscreen_fill":0, + "option_ios_launchscreen_image":"${base_options_dir}/ios/splash/launchscreen.png", + "option_ios_launchscreen_image_landscape":"${base_options_dir}/ios/splash/launchscreen-landscape.png", + "option_ios_min_version":"10.0", + "option_ios_orientation_landscape":true, + "option_ios_orientation_landscape_flipped":true, + "option_ios_orientation_portrait":true, + "option_ios_orientation_portrait_flipped":true, + "option_ios_output_dir":"~/gamemakerstudio2", + "option_ios_podfile_lock_path":"${options_dir}/ios/Podfile.lock", + "option_ios_podfile_path":"${options_dir}/ios/Podfile", + "option_ios_scale":0, + "option_ios_splashscreen_background_colour":255, + "option_ios_team_id":"", + "option_ios_texture_page":"2048x2048", + "option_ios_version":"1.0.0.0", + "resourceType":"GMiOSOptions", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/Shade/options/linux/options_linux.yy b/Shade/options/linux/options_linux.yy index d3575b0..94218d3 100644 --- a/Shade/options/linux/options_linux.yy +++ b/Shade/options/linux/options_linux.yy @@ -1,24 +1,26 @@ { - "resourceType": "GMLinuxOptions", - "resourceVersion": "1.0", - "name": "Linux", - "option_linux_display_name": "Created with GameMaker", - "option_linux_version": "1.0.0.0", - "option_linux_maintainer_email": "", - "option_linux_homepage": "http://www.yoyogames.com", - "option_linux_short_desc": "", - "option_linux_long_desc": "", - "option_linux_splash_screen": "${base_options_dir}/linux/splash/splash.png", - "option_linux_display_splash": false, - "option_linux_icon": "${base_options_dir}/linux/icons/64.png", - "option_linux_start_fullscreen": false, - "option_linux_allow_fullscreen": false, - "option_linux_interpolate_pixels": true, - "option_linux_display_cursor": true, - "option_linux_sync": false, - "option_linux_resize_window": false, - "option_linux_scale": 0, - "option_linux_texture_page": "2048x2048", - "option_linux_enable_steam": false, - "option_linux_disable_sandbox": false, + "$GMLinuxOptions":"", + "%Name":"Linux", + "name":"Linux", + "option_linux_allow_fullscreen":false, + "option_linux_disable_sandbox":false, + "option_linux_display_cursor":true, + "option_linux_display_name":"Created with GameMaker", + "option_linux_display_splash":false, + "option_linux_enable_steam":false, + "option_linux_homepage":"http://www.yoyogames.com", + "option_linux_icon":"${base_options_dir}/linux/icons/64.png", + "option_linux_interpolate_pixels":true, + "option_linux_long_desc":"", + "option_linux_maintainer_email":"", + "option_linux_resize_window":false, + "option_linux_scale":0, + "option_linux_short_desc":"", + "option_linux_splash_screen":"${base_options_dir}/linux/splash/splash.png", + "option_linux_start_fullscreen":false, + "option_linux_sync":false, + "option_linux_texture_page":"2048x2048", + "option_linux_version":"1.0.0.0", + "resourceType":"GMLinuxOptions", + "resourceVersion":"2.0", } \ No newline at end of file diff --git a/Shade/options/mac/options_mac.yy b/Shade/options/mac/options_mac.yy index 4ac3ef9..8f66f68 100644 --- a/Shade/options/mac/options_mac.yy +++ b/Shade/options/mac/options_mac.yy @@ -1,34 +1,38 @@ { - "resourceType": "GMMacOptions", - "resourceVersion": "1.0", - "name": "macOS", - "option_mac_display_name": "Created with GameMaker", - "option_mac_app_id": "com.company.game", - "option_mac_version": "1.0.0.0", - "option_mac_output_dir": "~/gamemakerstudio2", - "option_mac_team_id": "", - "option_mac_signing_identity": "Developer ID Application:", - "option_mac_copyright": "", - "option_mac_splash_png": "${base_options_dir}/mac/splash/splash.png", - "option_mac_icon_png": "${base_options_dir}/mac/icons/1024.png", - "option_mac_installer_background_png": "${base_options_dir}/mac/splash/installer_background.png", - "option_mac_menu_dock": false, - "option_mac_display_cursor": true, - "option_mac_start_fullscreen": false, - "option_mac_allow_fullscreen": false, - "option_mac_interpolate_pixels": true, - "option_mac_vsync": false, - "option_mac_resize_window": false, - "option_mac_enable_retina": false, - "option_mac_scale": 0, - "option_mac_texture_page": "2048x2048", - "option_mac_build_app_store": false, - "option_mac_allow_incoming_network": false, - "option_mac_allow_outgoing_network": false, - "option_mac_app_category": "Games", - "option_mac_enable_steam": false, - "option_mac_disable_sandbox": false, - "option_mac_x86_64": true, - "option_mac_arm64": true, - "option_mac_apple_sign_in": false, + "$GMMacOptions":"", + "%Name":"macOS", + "name":"macOS", + "option_mac_allow_fullscreen":false, + "option_mac_allow_incoming_network":false, + "option_mac_allow_outgoing_network":false, + "option_mac_apple_sign_in":false, + "option_mac_app_category":"Games", + "option_mac_app_id":"com.company.game", + "option_mac_arm64":true, + "option_mac_build_app_store":false, + "option_mac_build_number":0, + "option_mac_copyright":"", + "option_mac_disable_sandbox":false, + "option_mac_display_cursor":true, + "option_mac_display_name":"Created with GameMaker", + "option_mac_enable_retina":false, + "option_mac_enable_steam":false, + "option_mac_icon_png":"${base_options_dir}/mac/icons/1024.png", + "option_mac_installer_background_png":"${base_options_dir}/mac/splash/installer_background.png", + "option_mac_interpolate_pixels":true, + "option_mac_menu_dock":false, + "option_mac_min_version":"10.10", + "option_mac_output_dir":"~/gamemakerstudio2", + "option_mac_resize_window":false, + "option_mac_scale":0, + "option_mac_signing_identity":"Developer ID Application:", + "option_mac_splash_png":"${base_options_dir}/mac/splash/splash.png", + "option_mac_start_fullscreen":false, + "option_mac_team_id":"", + "option_mac_texture_page":"2048x2048", + "option_mac_version":"1.0.0.0", + "option_mac_vsync":false, + "option_mac_x86_64":true, + "resourceType":"GMMacOptions", + "resourceVersion":"2.0", } \ No newline at end of file diff --git a/Shade/options/main/options_main.yy b/Shade/options/main/options_main.yy index d44c1cc..0e26430 100644 --- a/Shade/options/main/options_main.yy +++ b/Shade/options/main/options_main.yy @@ -1,20 +1,23 @@ { - "resourceType": "GMMainOptions", - "resourceVersion": "1.4", - "name": "Main", - "option_gameguid": "b29648e0-4804-438d-8ba0-a54121d3e462", - "option_gameid": "0", - "option_game_speed": 60, - "option_mips_for_3d_textures": false, - "option_draw_colour": 4294967295, - "option_window_colour": 255, - "option_steam_app_id": "0", - "option_sci_usesci": false, - "option_author": "", - "option_collision_compatibility": false, - "option_copy_on_write_enabled": false, - "option_spine_licence": false, - "option_template_image": "${base_options_dir}/main/template_image.png", - "option_template_icon": "${base_options_dir}/main/template_icon.png", - "option_template_description": null, + "$GMMainOptions":"v1", + "%Name":"Main", + "name":"Main", + "option_author":"", + "option_collision_compatibility":false, + "option_copy_on_write_enabled":false, + "option_draw_colour":4294967295, + "option_gameguid":"b29648e0-4804-438d-8ba0-a54121d3e462", + "option_gameid":"0", + "option_game_speed":60, + "option_mips_for_3d_textures":false, + "option_remove_unused_assets":false, + "option_sci_usesci":false, + "option_spine_licence":false, + "option_steam_app_id":"0", + "option_template_description":null, + "option_template_icon":"${base_options_dir}/main/template_icon.png", + "option_template_image":"${base_options_dir}/main/template_image.png", + "option_window_colour":255, + "resourceType":"GMMainOptions", + "resourceVersion":"2.0", } \ No newline at end of file diff --git a/Shade/options/operagx/options_operagx.yy b/Shade/options/operagx/options_operagx.yy index 9571f96..e9ccf52 100644 --- a/Shade/options/operagx/options_operagx.yy +++ b/Shade/options/operagx/options_operagx.yy @@ -1,18 +1,29 @@ { - "resourceType": "GMOperaGXOptions", - "resourceVersion": "1.0", - "name": "operagx", - "option_operagx_version": "1.0.0.0", - "option_operagx_next_version": "1.0.0.0", - "option_operagx_game_name": "${project_name}", - "option_operagx_interpolate_pixels": true, - "option_operagx_scale": 0, - "option_operagx_texture_page": "2048x2048", - "option_operagx_display_cursor": true, - "option_operagx_guid": "", - "option_operagx_team_name": "", - "option_operagx_team_id": "", - "option_operagx_editUrl": "", - "option_operagx_internalShareUrl": "", - "option_operagx_publicShareUrl": "", + "$GMOperaGXOptions":"", + "%Name":"operagx", + "name":"operagx", + "option_operagx_display_cursor":true, + "option_operagx_editUrl":"", + "option_operagx_game_name":"${project_name}", + "option_operagx_guid":"", + "option_operagx_internalShareUrl":"", + "option_operagx_interpolate_pixels":true, + "option_operagx_mod_editUrl":"", + "option_operagx_mod_game_name":"${project_name}", + "option_operagx_mod_guid":"", + "option_operagx_mod_internalShareUrl":"", + "option_operagx_mod_next_version":"1.0.0.0", + "option_operagx_mod_publicShareUrl":"", + "option_operagx_mod_team_id":"", + "option_operagx_mod_team_name":"", + "option_operagx_mod_version":"1.0.0.0", + "option_operagx_next_version":"1.0.0.0", + "option_operagx_publicShareUrl":"", + "option_operagx_scale":0, + "option_operagx_team_id":"", + "option_operagx_team_name":"", + "option_operagx_texture_page":"2048x2048", + "option_operagx_version":"1.0.0.0", + "resourceType":"GMOperaGXOptions", + "resourceVersion":"2.0", } \ No newline at end of file diff --git a/Shade/options/tvos/options_tvos.yy b/Shade/options/tvos/options_tvos.yy new file mode 100644 index 0000000..1b7fc16 --- /dev/null +++ b/Shade/options/tvos/options_tvos.yy @@ -0,0 +1,31 @@ +{ + "$GMtvOSOptions":"v1", + "%Name":"tvOS", + "name":"tvOS", + "option_tvos_build_number":0, + "option_tvos_bundle_name":"com.company.game", + "option_tvos_display_cursor":false, + "option_tvos_display_name":"Made in GameMaker", + "option_tvos_enable_broadcast":false, + "option_tvos_icon_1280":"${base_options_dir}/tvos/icons/1280.png", + "option_tvos_icon_400":"${base_options_dir}/tvos/icons/400.png", + "option_tvos_icon_400_2x":"${base_options_dir}/tvos/icons/400_2x.png", + "option_tvos_interpolate_pixels":true, + "option_tvos_min_version":"10.0", + "option_tvos_output_dir":"~/GameMakerStudio2/tvOS", + "option_tvos_podfile_lock_path":"${options_dir}\\tvos\\Podfile.lock", + "option_tvos_podfile_path":"${options_dir}\\tvos\\Podfile", + "option_tvos_scale":0, + "option_tvos_splashscreen":"${base_options_dir}/tvos/splash/splash.png", + "option_tvos_splashscreen_2x":"${base_options_dir}/tvos/splash/splash_2x.png", + "option_tvos_splash_time":0, + "option_tvos_team_id":"", + "option_tvos_texture_page":"2048x2048", + "option_tvos_topshelf":"${base_options_dir}/tvos/topshelf/topshelf.png", + "option_tvos_topshelf_2x":"${base_options_dir}/tvos/topshelf/topshelf_2x.png", + "option_tvos_topshelf_wide":"${base_options_dir}/tvos/topshelf/topshelf_wide.png", + "option_tvos_topshelf_wide_2x":"${base_options_dir}/tvos/topshelf/topshelf_wide_2x.png", + "option_tvos_version":"1.0.0.0", + "resourceType":"GMtvOSOptions", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/Shade/options/windows/options_windows.yy b/Shade/options/windows/options_windows.yy index 83bb76a..9882494 100644 --- a/Shade/options/windows/options_windows.yy +++ b/Shade/options/windows/options_windows.yy @@ -1,34 +1,36 @@ { - "resourceType": "GMWindowsOptions", - "resourceVersion": "1.1", - "name": "Windows", - "option_windows_display_name": "Created with GameMaker", - "option_windows_executable_name": "${project_name}.exe", - "option_windows_version": "1.0.0.0", - "option_windows_company_info": "YoYo Games Ltd", - "option_windows_product_info": "Created with GameMaker", - "option_windows_copyright_info": "", - "option_windows_description_info": "A GameMaker Game", - "option_windows_display_cursor": true, - "option_windows_icon": "${base_options_dir}/windows/icons/icon.ico", - "option_windows_save_location": 0, - "option_windows_splash_screen": "${base_options_dir}/windows/splash/splash.png", - "option_windows_use_splash": false, - "option_windows_start_fullscreen": false, - "option_windows_allow_fullscreen_switching": false, - "option_windows_interpolate_pixels": false, - "option_windows_vsync": false, - "option_windows_resize_window": false, - "option_windows_borderless": false, - "option_windows_scale": 0, - "option_windows_copy_exe_to_dest": false, - "option_windows_sleep_margin": 10, - "option_windows_texture_page": "2048x2048", - "option_windows_installer_finished": "${base_options_dir}/windows/installer/finished.bmp", - "option_windows_installer_header": "${base_options_dir}/windows/installer/header.bmp", - "option_windows_license": "${base_options_dir}/windows/installer/license.txt", - "option_windows_nsis_file": "${base_options_dir}/windows/installer/nsis_script.nsi", - "option_windows_enable_steam": false, - "option_windows_disable_sandbox": false, - "option_windows_steam_use_alternative_launcher": false, + "$GMWindowsOptions":"", + "%Name":"Windows", + "name":"Windows", + "option_windows_allow_fullscreen_switching":false, + "option_windows_borderless":false, + "option_windows_company_info":"YoYo Games Ltd", + "option_windows_copyright_info":"", + "option_windows_copy_exe_to_dest":false, + "option_windows_description_info":"A GameMaker Game", + "option_windows_disable_sandbox":false, + "option_windows_display_cursor":true, + "option_windows_display_name":"Created with GameMaker", + "option_windows_enable_steam":false, + "option_windows_executable_name":"${project_name}.exe", + "option_windows_icon":"${base_options_dir}/windows/icons/icon.ico", + "option_windows_installer_finished":"${base_options_dir}/windows/installer/finished.bmp", + "option_windows_installer_header":"${base_options_dir}/windows/installer/header.bmp", + "option_windows_interpolate_pixels":false, + "option_windows_license":"${base_options_dir}/windows/installer/license.txt", + "option_windows_nsis_file":"${base_options_dir}/windows/installer/nsis_script.nsi", + "option_windows_product_info":"Created with GameMaker", + "option_windows_resize_window":false, + "option_windows_save_location":0, + "option_windows_scale":0, + "option_windows_sleep_margin":10, + "option_windows_splash_screen":"${base_options_dir}/windows/splash/splash.png", + "option_windows_start_fullscreen":false, + "option_windows_steam_use_alternative_launcher":false, + "option_windows_texture_page":"2048x2048", + "option_windows_use_splash":false, + "option_windows_version":"1.0.0.0", + "option_windows_vsync":false, + "resourceType":"GMWindowsOptions", + "resourceVersion":"2.0", } \ No newline at end of file diff --git a/Shade/rooms/Room1/Room1.yy b/Shade/rooms/Room1/Room1.yy index 243e41f..c6b9bd0 100644 --- a/Shade/rooms/Room1/Room1.yy +++ b/Shade/rooms/Room1/Room1.yy @@ -1,55 +1,57 @@ { - "resourceType": "GMRoom", - "resourceVersion": "1.0", - "name": "Room1", - "isDnd": false, - "volume": 1.0, - "parentRoom": null, - "views": [ - {"inherit":false,"visible":false,"xview":0,"yview":0,"wview":960,"hview":540,"xport":0,"yport":0,"wport":960,"hport":540,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,}, - {"inherit":false,"visible":false,"xview":0,"yview":0,"wview":960,"hview":540,"xport":0,"yport":0,"wport":960,"hport":540,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,}, - {"inherit":false,"visible":false,"xview":0,"yview":0,"wview":960,"hview":540,"xport":0,"yport":0,"wport":960,"hport":540,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,}, - {"inherit":false,"visible":false,"xview":0,"yview":0,"wview":960,"hview":540,"xport":0,"yport":0,"wport":960,"hport":540,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,}, - {"inherit":false,"visible":false,"xview":0,"yview":0,"wview":960,"hview":540,"xport":0,"yport":0,"wport":960,"hport":540,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,}, - {"inherit":false,"visible":false,"xview":0,"yview":0,"wview":960,"hview":540,"xport":0,"yport":0,"wport":960,"hport":540,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,}, - {"inherit":false,"visible":false,"xview":0,"yview":0,"wview":960,"hview":540,"xport":0,"yport":0,"wport":960,"hport":540,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,}, - {"inherit":false,"visible":false,"xview":0,"yview":0,"wview":960,"hview":540,"xport":0,"yport":0,"wport":960,"hport":540,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,}, - ], - "layers": [ - {"resourceType":"GMRInstanceLayer","resourceVersion":"1.0","name":"Instances","instances":[ - {"resourceType":"GMRInstance","resourceVersion":"1.0","name":"inst_22A1968F","properties":[],"isDnd":false,"objectId":{"name":"obj_shadeTest","path":"objects/obj_shadeTest/obj_shadeTest.yy",},"inheritCode":false,"hasCreationCode":false,"colour":4294967295,"rotation":0.0,"scaleX":1.0,"scaleY":1.0,"imageIndex":0,"imageSpeed":1.0,"inheritedItemId":null,"frozen":false,"ignore":false,"inheritItemSettings":false,"x":384.0,"y":160.0,}, - ],"visible":true,"depth":0,"userdefinedDepth":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"effectEnabled":true,"effectType":null,"properties":[],}, - {"resourceType":"GMRBackgroundLayer","resourceVersion":"1.0","name":"Background","spriteId":null,"colour":4278190080,"x":0,"y":0,"htiled":false,"vtiled":false,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":15.0,"animationSpeedType":0,"userdefinedAnimFPS":false,"visible":true,"depth":100,"userdefinedDepth":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"effectEnabled":true,"effectType":null,"properties":[],}, - ], - "inheritLayers": false, - "creationCodeFile": "", - "inheritCode": false, - "instanceCreationOrder": [ + "$GMRoom":"v1", + "%Name":"Room1", + "creationCodeFile":"", + "inheritCode":false, + "inheritCreationOrder":false, + "inheritLayers":false, + "instanceCreationOrder":[ {"name":"inst_22A1968F","path":"rooms/Room1/Room1.yy",}, ], - "inheritCreationOrder": false, - "sequenceId": null, - "roomSettings": { - "inheritRoomSettings": false, - "Width": 960, - "Height": 540, - "persistent": false, + "isDnd":false, + "layers":[ + {"$GMRInstanceLayer":"","%Name":"Instances","depth":0,"effectEnabled":true,"effectType":null,"gridX":32,"gridY":32,"hierarchyFrozen":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"inheritSubLayers":true,"inheritVisibility":true,"instances":[ + {"$GMRInstance":"v1","%Name":"inst_22A1968F","colour":4294967295,"frozen":false,"hasCreationCode":false,"ignore":false,"imageIndex":0,"imageSpeed":1.0,"inheritCode":false,"inheritedItemId":null,"inheritItemSettings":false,"isDnd":false,"name":"inst_22A1968F","objectId":{"name":"obj_shadeTest","path":"objects/obj_shadeTest/obj_shadeTest.yy",},"properties":[],"resourceType":"GMRInstance","resourceVersion":"2.0","rotation":0.0,"scaleX":1.0,"scaleY":1.0,"x":384.0,"y":160.0,}, + ],"layers":[],"name":"Instances","properties":[],"resourceType":"GMRInstanceLayer","resourceVersion":"2.0","userdefinedDepth":false,"visible":true,}, + {"$GMRBackgroundLayer":"","%Name":"Background","animationFPS":15.0,"animationSpeedType":0,"colour":4278190080,"depth":100,"effectEnabled":true,"effectType":null,"gridX":32,"gridY":32,"hierarchyFrozen":false,"hspeed":0.0,"htiled":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"inheritSubLayers":true,"inheritVisibility":true,"layers":[],"name":"Background","properties":[],"resourceType":"GMRBackgroundLayer","resourceVersion":"2.0","spriteId":null,"stretch":false,"userdefinedAnimFPS":false,"userdefinedDepth":false,"visible":true,"vspeed":0.0,"vtiled":false,"x":0,"y":0,}, + ], + "name":"Room1", + "parent":{ + "name":"Example", + "path":"folders/Example.yy", }, - "viewSettings": { - "inheritViewSettings": false, - "enableViews": false, - "clearViewBackground": false, - "clearDisplayBuffer": true, + "parentRoom":null, + "physicsSettings":{ + "inheritPhysicsSettings":false, + "PhysicsWorld":false, + "PhysicsWorldGravityX":0.0, + "PhysicsWorldGravityY":10.0, + "PhysicsWorldPixToMetres":0.1, }, - "physicsSettings": { - "inheritPhysicsSettings": false, - "PhysicsWorld": false, - "PhysicsWorldGravityX": 0.0, - "PhysicsWorldGravityY": 10.0, - "PhysicsWorldPixToMetres": 0.1, + "resourceType":"GMRoom", + "resourceVersion":"2.0", + "roomSettings":{ + "Height":540, + "inheritRoomSettings":false, + "persistent":false, + "Width":960, }, - "parent": { - "name": "Example", - "path": "folders/Example.yy", + "sequenceId":null, + "views":[ + {"hborder":32,"hport":540,"hspeed":-1,"hview":540,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":960,"wview":960,"xport":0,"xview":0,"yport":0,"yview":0,}, + {"hborder":32,"hport":540,"hspeed":-1,"hview":540,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":960,"wview":960,"xport":0,"xview":0,"yport":0,"yview":0,}, + {"hborder":32,"hport":540,"hspeed":-1,"hview":540,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":960,"wview":960,"xport":0,"xview":0,"yport":0,"yview":0,}, + {"hborder":32,"hport":540,"hspeed":-1,"hview":540,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":960,"wview":960,"xport":0,"xview":0,"yport":0,"yview":0,}, + {"hborder":32,"hport":540,"hspeed":-1,"hview":540,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":960,"wview":960,"xport":0,"xview":0,"yport":0,"yview":0,}, + {"hborder":32,"hport":540,"hspeed":-1,"hview":540,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":960,"wview":960,"xport":0,"xview":0,"yport":0,"yview":0,}, + {"hborder":32,"hport":540,"hspeed":-1,"hview":540,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":960,"wview":960,"xport":0,"xview":0,"yport":0,"yview":0,}, + {"hborder":32,"hport":540,"hspeed":-1,"hview":540,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":960,"wview":960,"xport":0,"xview":0,"yport":0,"yview":0,}, + ], + "viewSettings":{ + "clearDisplayBuffer":true, + "clearViewBackground":false, + "enableViews":false, + "inheritViewSettings":false, }, + "volume":1.0, } \ No newline at end of file diff --git a/Shade/scripts/Shade/Shade.gml b/Shade/scripts/Shade/Shade.gml index b5e4ba2..b8ac627 100644 --- a/Shade/scripts/Shade/Shade.gml +++ b/Shade/scripts/Shade/Shade.gml @@ -4,7 +4,7 @@ globalvar __currentShade; __currentShade = __NO_SHADER; //Uniform types -enum UniTypes { +enum UNIFORMTYPES { f, f_array, i, @@ -41,12 +41,12 @@ function __buildShade(shd) constructor { } //Uniforms - static loadUni = function(uni_name){ + static loadUniform = function(uni_name){ __Shade_trace("Loading uniform of name '"+uni_name+"'") unis[$ uni_name] = shader_get_uniform(shader,uni_name); } - static applyUni = function(uni_name,value,type=UniTypes.f){ + static applyUniform = function(uni_name,value,type=UNIFORMTYPES.f){ if(__currentShade != name){ return -1; } @@ -56,12 +56,12 @@ function __buildShade(shd) constructor { switch(type){ - case UniTypes.f: shader_set_uniform_f(_uni, value); break; - case UniTypes.f_array: shader_set_uniform_f_array(_uni, value); break; - case UniTypes.i: shader_set_uniform_i(_uni, value); break; - case UniTypes.i_array: shader_set_uniform_i_array(_uni, value); break; - case UniTypes.matrix: shader_set_uniform_matrix(_uni); break; - case UniTypes.matrix_array: shader_set_uniform_matrix_array(_uni, value); break; + case UNIFORMTYPES.f: shader_set_uniform_f(_uni, value); break; + case UNIFORMTYPES.f_array: shader_set_uniform_f_array(_uni, value); break; + case UNIFORMTYPES.i: shader_set_uniform_i(_uni, value); break; + case UNIFORMTYPES.i_array: shader_set_uniform_i_array(_uni, value); break; + case UNIFORMTYPES.matrix: shader_set_uniform_matrix(_uni); break; + case UNIFORMTYPES.matrix_array: shader_set_uniform_matrix_array(_uni, value); break; } diff --git a/Shade/scripts/Shade/Shade.yy b/Shade/scripts/Shade/Shade.yy index 56d3d48..1514606 100644 --- a/Shade/scripts/Shade/Shade.yy +++ b/Shade/scripts/Shade/Shade.yy @@ -1,11 +1,13 @@ { - "resourceType": "GMScript", - "resourceVersion": "1.0", - "name": "Shade", - "isDnD": false, - "isCompatibility": false, - "parent": { - "name": "Shade", - "path": "Shade.yyp", + "$GMScript":"v1", + "%Name":"Shade", + "isCompatibility":false, + "isDnD":false, + "name":"Shade", + "parent":{ + "name":"Shade", + "path":"Shade.yyp", }, + "resourceType":"GMScript", + "resourceVersion":"2.0", } \ No newline at end of file diff --git a/Shade/shaders/shd_test/shd_test.yy b/Shade/shaders/shd_test/shd_test.yy index 78bdca1..9ed4e01 100644 --- a/Shade/shaders/shd_test/shd_test.yy +++ b/Shade/shaders/shd_test/shd_test.yy @@ -1,10 +1,12 @@ { - "resourceType": "GMShader", - "resourceVersion": "1.0", - "name": "shd_test", - "type": 1, - "parent": { - "name": "Example", - "path": "folders/Example.yy", + "$GMShader":"", + "%Name":"shd_test", + "name":"shd_test", + "parent":{ + "name":"Example", + "path":"folders/Example.yy", }, + "resourceType":"GMShader", + "resourceVersion":"2.0", + "type":1, } \ No newline at end of file diff --git a/Shade/sprites/Sprite1/Sprite1.yy b/Shade/sprites/Sprite1/Sprite1.yy index 93f8b3a..16790c4 100644 --- a/Shade/sprites/Sprite1/Sprite1.yy +++ b/Shade/sprites/Sprite1/Sprite1.yy @@ -1,73 +1,90 @@ { - "resourceType": "GMSprite", - "resourceVersion": "1.0", - "name": "Sprite1", - "bboxMode": 0, - "collisionKind": 1, - "type": 0, - "origin": 0, - "preMultiplyAlpha": false, - "edgeFiltering": false, - "collisionTolerance": 0, - "swfPrecision": 2.525, - "bbox_left": 0, - "bbox_right": 0, - "bbox_top": 0, - "bbox_bottom": 0, - "HTile": false, - "VTile": false, - "For3D": false, - "width": 1, - "height": 1, - "textureGroupId": { - "name": "Default", - "path": "texturegroups/Default", - }, - "swatchColours": null, - "gridX": 0, - "gridY": 0, - "frames": [ - {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"189aa037-96b3-4d92-ba68-879278b784ad",}, + "$GMSprite":"", + "%Name":"Sprite1", + "bboxMode":0, + "bbox_bottom":0, + "bbox_left":0, + "bbox_right":0, + "bbox_top":0, + "collisionKind":1, + "collisionTolerance":0, + "DynamicTexturePage":false, + "edgeFiltering":false, + "For3D":false, + "frames":[ + {"$GMSpriteFrame":"","%Name":"189aa037-96b3-4d92-ba68-879278b784ad","name":"189aa037-96b3-4d92-ba68-879278b784ad","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + ], + "gridX":0, + "gridY":0, + "height":1, + "HTile":false, + "layers":[ + {"$GMImageLayer":"","%Name":"d4e77542-16f8-4edf-9039-53cf016f33b3","blendMode":0,"displayName":"default","isLocked":false,"name":"d4e77542-16f8-4edf-9039-53cf016f33b3","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, ], - "sequence": { - "resourceType": "GMSequence", - "resourceVersion": "1.4", - "name": "Sprite1", - "timeUnits": 1, - "playback": 1, - "playbackSpeed": 30.0, - "playbackSpeedType": 0, - "autoRecord": true, - "volume": 1.0, - "length": 1.0, - "events": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore",}, - "moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore",}, - "tracks": [ - {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","spriteId":null,"keyframes":{"Keyframes":[ - {"id":"a3f50cf1-0fb5-4108-a270-d917f8b55915","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"189aa037-96b3-4d92-ba68-879278b784ad","path":"sprites/Sprite1/Sprite1.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe",}, - ],"resourceVersion":"1.0","resourceType":"KeyframeStore",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"isCreationTrack":false,"modifiers":[],}, + "name":"Sprite1", + "nineSlice":null, + "origin":0, + "parent":{ + "name":"Example", + "path":"folders/Example.yy", + }, + "preMultiplyAlpha":false, + "resourceType":"GMSprite", + "resourceVersion":"2.0", + "sequence":{ + "$GMSequence":"", + "%Name":"Sprite1", + "autoRecord":true, + "backdropHeight":768, + "backdropImageOpacity":0.5, + "backdropImagePath":"", + "backdropWidth":1366, + "backdropXOffset":0.0, + "backdropYOffset":0.0, + "events":{ + "$KeyframeStore":"", + "Keyframes":[], + "resourceType":"KeyframeStore", + "resourceVersion":"2.0", + }, + "eventStubScript":null, + "eventToFunction":{}, + "length":1.0, + "lockOrigin":false, + "moments":{ + "$KeyframeStore":"", + "Keyframes":[], + "resourceType":"KeyframeStore", + "resourceVersion":"2.0", + }, + "name":"Sprite1", + "playback":1, + "playbackSpeed":30.0, + "playbackSpeedType":0, + "resourceType":"GMSequence", + "resourceVersion":"2.0", + "showBackdrop":true, + "showBackdropImage":false, + "timeUnits":1, + "tracks":[ + {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"189aa037-96b3-4d92-ba68-879278b784ad","path":"sprites/Sprite1/Sprite1.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"a3f50cf1-0fb5-4108-a270-d917f8b55915","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], - "visibleRange": null, - "lockOrigin": false, - "showBackdrop": true, - "showBackdropImage": false, - "backdropImagePath": "", - "backdropImageOpacity": 0.5, - "backdropWidth": 1366, - "backdropHeight": 768, - "backdropXOffset": 0.0, - "backdropYOffset": 0.0, - "xorigin": 0, - "yorigin": 0, - "eventToFunction": {}, - "eventStubScript": null, + "visibleRange":null, + "volume":1.0, + "xorigin":0, + "yorigin":0, }, - "layers": [ - {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"d4e77542-16f8-4edf-9039-53cf016f33b3","visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default",}, - ], - "nineSlice": null, - "parent": { - "name": "Example", - "path": "folders/Example.yy", + "swatchColours":null, + "swfPrecision":2.525, + "textureGroupId":{ + "name":"Default", + "path":"texturegroups/Default", }, + "type":0, + "VTile":false, + "width":1, } \ No newline at end of file From 260de480f7c81d8a7526a113866a265ddc1cb4d4 Mon Sep 17 00:00:00 2001 From: Michael McMullen <811123+michael-mcmullen@users.noreply.github.com> Date: Fri, 12 Jul 2024 12:50:08 -0400 Subject: [PATCH 3/4] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e19458..63115b3 100644 --- a/README.md +++ b/README.md @@ -25,13 +25,13 @@ to apply a value to an uniform, you then use `applyUniform(* uniform name *, * v ``` myShade.loadUniform("u_time"); -myShade.applyUniform("u_time", current_time, UniTypes.f); +myShade.applyUniform("u_time", current_time, UNIFORMTYPES.f); ``` `loadUniform()` is not necessary since `applyUniform()` will load the uniform id if it wasn't loeaded before, but you can use it if you want.
- ### UniformTypes list + ### UNIFORMTYPES list * f - float * f_array - float array From f434a8547d6303e8a18bf77a3bf032a6ee710fcd Mon Sep 17 00:00:00 2001 From: Michael McMullen <811123+michael-mcmullen@users.noreply.github.com> Date: Sat, 13 Jul 2024 15:24:02 -0400 Subject: [PATCH 4/4] Update Shade.gml --- Shade/scripts/Shade/Shade.gml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shade/scripts/Shade/Shade.gml b/Shade/scripts/Shade/Shade.gml index b8ac627..aa840af 100644 --- a/Shade/scripts/Shade/Shade.gml +++ b/Shade/scripts/Shade/Shade.gml @@ -50,7 +50,7 @@ function __buildShade(shd) constructor { if(__currentShade != name){ return -1; } - if(!variable_struct_exists(unis,uni_name)){ loadUni(uni_name); } + if(!variable_struct_exists(unis,uni_name)){ loadUniform(uni_name); } var _uni = unis[$ uni_name];