PrettyMuchBryce

Members
  • Content Count

    9
  • Joined

  • Last visited

About PrettyMuchBryce

  • Rank
    Newbie

Contact Methods

  • Twitter
    prettymuchbryce
  1. Hi Ivan, First off thanks for your response. Unfortunately I think I did a poor job of communicating in my original post. Using mapCoord and unmapCoord in combination with the filterArea is a good start. Now I can use actual screen pixels in my fragment shader. The missing piece then is how do I translate this back to the original pixels of my container ? For example if I have a Sprite within a container. Imagine the sprite is 200x200 pixels, but it sits inside of a container with 2x scale, and the container has some negative x and y position. How can I map the pixels from my filterArea back to the pixels of the original 200x200 image ? Lets say I want to say essentially in my fragment shader "If this pixel is in the upper left quadrant of the original image". Is there some kind of transformation matrix I should pass in the shader in order to do this calculation ? Hopefully I am making some sense here. I am pretty new to shaders and filters.
  2. Hello. I am trying to build a sort of "Line of sight" shader. I have the a tilemap which is just a Sprite sitting inside of a container. Then I am generating another texture dynamically which represents the "light" data. I want to create a fragment shader to show/hide parts of this tilemap based on the light texture/ I am able to pass this texture into the shader, however I am seeing a problem that I think may be intended behavior, but I'm trying to figure out how to achieve my desired result. The problem is it seems the fragment shader is operating on the screen rather than the underlying pixels in my Container. The container is scaled/translated so I have no way to know which true (non translated/scaled) pixel I am operating on within the shader (vTextureCoord seems to give me coordinates relative to the screen ?). Whereas the lightmap texture I am passing in does not have this same problem. This is my first time playing around with pixi.js filters. Any suggestions ?
  3. Hey everyone. I've been meaning to post here more often, and I finally found an excuse today. As we know, getting up and running with a simple web game development project can be very time consuming. So many frameworks to choose from, dependencies to manage, etc. Today I updated my typescript/pixi template which has been working out pretty well for me so far (Thinking of making a Phaser one soon). This got me thinking. What templates do you usually use for getting started with new projects ? What if you want to hammer out a quick prototype ? Do you start from scratch ? Copy stuff from old projects ? Just curious what most people's workflow is for this.
  4. Thanks digibo. Making the texture POT, and setting roundPixels to true seems to have resolved the issue. Appreciate the help.
  5. Yep. It seems to happen on both LINEAR, and NEAREST scaleModes. Maybe I should open an issue on github, and try to see if I can recreate the issue in an isolated example.
  6. Sorry for not clarifying. This is for the WebGLRenderer. CanvasRenderer doesn't seem to have the problem. Tonight I also tried not setting the scale on the SpriteBatch, but the problem still occurs.
  7. I'm using pixi 2.2.5, and recently tried my project out on a retina ipad. I'm running into a strange texture resizing issue. This is probably my fault somehow, but I am struggling to figure out how to get the ipad to resize the texture properly. As you see in the attached image, it seems mobile safari is off by 1 pixel when trying to render each tile sprite. This makes it look like theres some space between each tile because it is actually partially rendering the bottom of the tile above this one in the texture. The tile sprites themselves live in a SpriteBatch, and I'm doing some resizing by setting the scale on this SpriteBatch itself. I'm not doing anything else special to try to support this device other than a viewport meta tag. I figure this may be related to the device pixel ratio. I tried to double the size of the tile spritesheet, but the issue still seems to occur.
  8. Hello. Thanks for all the kind words. I have been working on the project for about a year now. My goal is to continue to improve the project, and make it accessible for as many people as possible. I am happy to answer any questions, or listen to any feedback here.
  9. Thanks casarock. I have included a link to your project in the README.md for easystar.