mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	2D GPU Particles working..
This commit is contained in:
		
							parent
							
								
									3c1fd26bb0
								
							
						
					
					
						commit
						95560e02c5
					
				
					 21 changed files with 1039 additions and 1340 deletions
				
			
		|  | @ -612,6 +612,7 @@ public: | |||
| 				TYPE_POLYGON, | ||||
| 				TYPE_MESH, | ||||
| 				TYPE_MULTIMESH, | ||||
| 				TYPE_PARTICLES, | ||||
| 				TYPE_CIRCLE, | ||||
| 				TYPE_TRANSFORM, | ||||
| 				TYPE_CLIP_IGNORE, | ||||
|  | @ -707,6 +708,16 @@ public: | |||
| 			CommandMultiMesh() { type = TYPE_MULTIMESH; } | ||||
| 		}; | ||||
| 
 | ||||
| 		struct CommandParticles : public Command { | ||||
| 
 | ||||
| 			RID particles; | ||||
| 			RID texture; | ||||
| 			RID normal_map; | ||||
| 			int h_frames; | ||||
| 			int v_frames; | ||||
| 			CommandParticles() { type = TYPE_PARTICLES; } | ||||
| 		}; | ||||
| 
 | ||||
| 		struct CommandCircle : public Command { | ||||
| 
 | ||||
| 			Point2 pos; | ||||
|  | @ -844,6 +855,15 @@ public: | |||
| 
 | ||||
| 						r = Rect2(aabb.position.x, aabb.position.y, aabb.size.x, aabb.size.y); | ||||
| 
 | ||||
| 					} break; | ||||
| 					case Item::Command::TYPE_PARTICLES: { | ||||
| 
 | ||||
| 						const Item::CommandParticles *particles_cmd = static_cast<const Item::CommandParticles *>(c); | ||||
| 						if (particles_cmd->particles.is_valid()) { | ||||
| 							Rect3 aabb = RasterizerStorage::base_singleton->particles_get_aabb(particles_cmd->particles); | ||||
| 							r = Rect2(aabb.position.x, aabb.position.y, aabb.size.x, aabb.size.y); | ||||
| 						} | ||||
| 
 | ||||
| 					} break; | ||||
| 					case Item::Command::TYPE_CIRCLE: { | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Juan Linietsky
						Juan Linietsky