vendredi 30 janvier 2015

How do I create a own coordinate system for a SKScene?


Vote count:

0




My goal is to take an existing SKScene and stretch it according to a polynomial function, like one stretching everything toward or away from the center. The stretched form will be continuously rendered and presented to the user. It may be a new scene/image/view or whatever is necessary. The model will simply perform its functions over time in Euclidean form.


My project content is little more than the iOS SpriteKit starter project on Xcode.




  • I know of the functions in SKScene: code convertPointToView() convertPointFromView() endcode (Sorry, apparently stackoverflow does not allow the code format within a bullet point.) However, I don't understand how these will be much use for the view since the scene only has aspect fill, fits and resize settings.




  • I attempted to make a fragment shader to do the actual stretching, however, I could not figure out how to get existing color and position information to draw the new color according to the transformation.




  • I am using SpriteKit and I only know how to access fragment from among the shaders using SKShader. I do not know how to access vertex shaders from this context. Otherwise, I would have tried to use a vertex shader.





asked 49 secs ago







How do I create a own coordinate system for a SKScene?

Aucun commentaire:

Enregistrer un commentaire