I am building a shader in which I use ray casting. I am casting from one point(the light) onto the corners of a body(polygon). As this will be used for a mobile game I would like maximum performance and only want to get the outer lines(the other ones will be in between of the 2 outer ones). So to reapeat my question I would like to know which parameters I need to define which points this will be and how to do this. Thank you :) If you have any questions to my question just ask :)
How do i get the largest rectangle from casting from a point to corners of a polygon?
17 Views Asked by jay At
1
There are 1 best solutions below
Related Questions in SHADER
- How to use bitwise operators in GLSL
- Three.js how to determine if backfacing in a RawShaderMaterial that's double sided and transparent?
- UNITY_VERTEX_INPUT_INSTANCE_ID use in custom shader
- How to draw a WebGLTexture into another Canvas?
- How can I improve my brush on mobile with Unity slow touch interpretation problem?
- FrameBuffer texture reading black for each pixel WebGL
- Single WebGL 2.0 shader for multiple texture precisions
- How you can make a 3D mask in the UI so that it is displayed correctly. Unity
- Could I use multiple materials in Skybox?
- C++ DirectX compress 3D texture into 2D texture
- Enabling transparency on objects rendered to render texture makes them disappear completely on iOS - React Three Fiber
- i have a glslf file how do i convert that to rgb (primitive lua knowledge)
- Why unity do not include my shader to build but log them?
- Compiling vertex shader from vulkan tutorial with glslc gives error: linking multiple files in not supported yet
- Three.js using EffectComposer renderTarget texture is causing flickering / strobing
Related Questions in SHADOW
- How to create a CSS shadow that applies transparency to an element behind it
- Three js Shadow casting with 3dmLoader
- CSS - Element with 2 background images - How to drop shadow just around one of them?
- Applying shadows in react native
- Gradle Shadow plugin relocate an SPI service while preserving the service file name in META-INF/services
- Point light shadows work wrong, how can I debug it?
- Android: No CardView elevation on dark theme
- Ursina Python Engine: Question about the Lighting System
- Compose Card shadow behavior when inside a column
- Light occlusion Godot
- Unity - shadows not showing in WebGL / Game view only?
- Can I make IDEA show a hint to use a Kotlin extension function instead of a Java original?
- got stuck with python code. can someone help to solve the highlighted errors. thanks a lot
- Figma Drop Shadow In Android
- I can't see any shadows in r3f
Related Questions in RAYCASTING
- react three fiber gsap transition menu
- Unity draw.ray doesn't work, though it seems the code is being run
- Having trouble with my Raycast. How do I fix it?
- I can not draw a line using OpenGL
- I need help covering the edge cases of a ray casting algorithm on a simple 2d array
- Scaling & raycaster issues (breaking changes after updating to new Three.js & React Three Fiber versions)
- Perform a raycast using Chipmunk2D to detect collisions between two different types
- UI Text not clearing after focus loss on interactable item
- Why wont my fireball go in the correct direction upon spawning?
- How to reduce the gray-line artifacts in three.js isosurface rendering of 3D texture example?
- How to detect grid cell based on mouse position | Godotv4.2.1
- How to fix fish-eye effect while making doom like pseudo-3d raycaster game
- how do i test the color of a pixel in p5.js
- Point-In-Polygon boundary inclusive/exclusive
- Raycast doesn't hit UI objects
Related Questions in POLYGONS
- How to determine if two points do not have any obstructions between them
- Have Clipper Merge Polygon's (with hole) into One instead of Two Polygons
- Measure an area in Google Maps using Python
- R Leaflet GeoJSON Coloring
- Choropleth map using leaflet not displaying correct style
- Creating spatialpolygons dataframe from list of polygons
- How to define which diagonals belong to concave polygon
- ggplot2 - how to fill nested polygons with colour?
- Unity3D dynamic mesh with hole
- How do i get the largest rectangle from casting from a point to corners of a polygon?
- CSS3 polygons with images, how to?
- Python turtle end_poly() does not work
- Dividing Individual Spatial Polygons Equally in R
- Randomly choose vertex points for polygons, as well as randomize the color of the overall polygon
- How to correctly triangulate a polygon in C++
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
After drawing a little on my whiteboard(they are great for finding solutions to problems) I found out that the corners with the highest positive and negative ratio are the ones i looked for: highest and lowest deltaY:deltaY. You would go through the ratios and use max() and min() to get the 2 corners :) I hope that this will help somebody and never forget to use your whiteboard.