Coder Social home page Coder Social logo

paulloz / godot-colorblindness Goto Github PK

View Code? Open in Web Editor NEW
111.0 4.0 5.0 187 KB

A colorblindness simulator to help you design for everyone.

License: MIT License

GDScript 100.00%
game-development accessibility video-game godot-engine colorblindness-simulator godot-colorblindness godot shader gamedev

godot-colorblindness's Introduction

godot-colorblindness

A colorblindness simulator to help you design for everyone.

If you like godot-colorblindness, please consider buying me a coffee:
ko-fi

The color calculations I use are heavily based on:

The Godot Ishihara plate has been generated with this tool.

Usage

  • Install the plugin through Godot's AssetLib.
  • Activate it from the Plugin menu (AssetLib => Plugins button).
  • This adds a new control called Colorblindness under CanvasLayer.
  • Create a new Colorblindness control to it in your scene.
  • Specify the Type property (eg. Deuteranopia).

Everything that renders under the control will appear tinted to match your selected color-blindness mode.

Known issues

  • Setting Framebuffer Allocation to 2D without Sampling makes the addon unusable (#4).

Sample

The following sample shows normal vision, Protanopia, Deuteranopia, and Tritanopia (in that order).

normal vision Normal vision

Protanopia Protanopia

Deuteranopia Deuteranopia

Tritanopia Tritanopia

godot-colorblindness's People

Contributors

el-falso avatar nightblade9 avatar paulloz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

godot-colorblindness's Issues

Black screen on GLES2

Hello! I'm not sure if this is GLES3-only, but I get the following error using GLES2:

E 0:00:00.436 _copy_screen: Can't use screen texture copying in a render target configured without copy buffers. <C++ Error> Condition "storage->frame.current_rt->copy_screen_effect.color == 0" is true. <C++ Source> drivers/gles2/rasterizer_canvas_base_gles2.cpp:734 @ _copy_screen()

3D scene issue - no effect is seen

I hope that's not just me (and that I'm doing something stupidly, embarassingly wrong), but I'm having trouble with the addon in a 3d scene.

I created a gradient material and applied it to a plane to test the functionality, but here's my repro:

  1. Create a 3D scene
  2. Add a camera
  3. Add a meshinstance
  4. Create a Plane
  5. Create a material that would easily show a difference in color perception (I created a simple gradient on albedo)
  6. Follow the steps found in usage: add a CanvasLayer
  7. Add Colorblindness.gd as a child
  8. Change the colorblindness type from the Type dropdown
  9. Save and run scene.
  10. Notice no change in color.

2020-05-11 15_24_22-jumpcut

Mouse input bug

If you place the Colorblind canvas as a parent or even root of your scene, you may not be able to use any screen input.
To fix this you need to add the IGNORE property to the inner Colorblind's ColorRect node like this:

func _ready():
	self.add_child(self.rect)

	self.rect.rect_min_size = self.rect.get_viewport_rect().size
	self.rect.material = load("res://addons/paulloz.colorblindness/colorblindness.material")
	self.rect.set_mouse_filter(2) # ADD THIS LINE
	if self.temp:
		self.Type = self.temp
		self.temp = null

	self.get_tree().root.connect('size_changed', self, '_on_viewport_size_changed')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.