|Anonymous | Login | Signup for a new account||2017-11-24 18:23 GMT|
|My View | View Issues | Roadmap | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0018170||Runner||3D||Public||2015-06-06 12:53||2017-08-04 14:06|
|Assigned To||Mike Dailly|
|Priority||Low||Severity||C - General||Reproducibility||100%|
|Platform||Windows||OS||Window 8.1||OS Version||64-bit Home|
|Summary||0018170: image_index rounds differently depending on context|
|Description||With normal sprite drawing functions, image_index is floored when selecting a sprite subimage to draw.|
With texture functions, image_index is rounded to the nearest integer when select a sprite subimage to reference.
With shader functions, image_index is sometimes rounded to the nearest integer when selecting a sprite subimage to reference. It appears to behave differently depending on if the sprite occupies more than one texture page. This may be due to the GGS texture page size setting or the "Used for 3D" setting.
|Steps To Reproduce||In the attached example, a "1" or a "2" appear depending on the rounding of image_index which is set to a value of 0.55.|
In the top portion, the left is drawn with draw_self() and the right is drawn using a primitive textured by the current sprite and subimage settings.
In the lower portion, a shader is used to draw the current sprite and subimage. A "1" appears in the red channel when the shader references gm_BaseTexture and a "2" appears in the blue channel when the shader uses a staged textures which is set to display the same image.
If the GGS texture page size is increased so that the sprite occupies only one page, the shader functions as expected.
Workaround: Always use floor(image_index) for operations which require a sprite subimage.
|Additional Information||Only Windows and Windows (YYC) have been tested. HTML5 failed to run under Chrome.|
|2.x Runtime Version|
|2.x Runtime Version Verified In|
|Attached Files|| image_index.gmz [^] (1,179,251 bytes) 2015-06-06 12:53|
Screenshot 2015-06-06 08.03.02.png [^] (13,330 bytes) 2015-06-06 13:05
edited on: 2015-06-06 12:53
|Function sprite_get_tpe(sprite, index) should probably be looked at. I don't know how to use it so it was not tested.|
Mike Dailly (Manager)
|fixed - all display 1 on windows (GMS2) and HTML5|
|Copyright © 2000 - 2017 MantisBT Team|