Questions tagged [light]

Questions related to drawing or setting light on an object, for use in GUI, or programming questions on controlling light values within a program e.g. controlling light within a program that uses a camera. Not to be used with light, as is used in physics having wave and particle characteristics. Must be used with other relevant tags distinguishing the programming language and framework being used. e.g. unity 3d

Questions related to drawing or setting light on an object, or programming questions on controlling light values within a program e.g. controlling light within a program that uses a camera.

Not to be used with light, as is used in physics having wave and particle characteristics.

The use of the light tag here is as light is exposed within a graphical user interface and how to alter the settings and angles of the light. e.g. unity3d

For use of programming in e.g. Android where a program may be written that utilizes the camera and programming filters affecting the selection of light through the camera.

648 questions
4
votes
1 answer

Virtual Light Sensor for Windows 8 Desktop

I want to develop a desktop application (C#) with support for light sensors but I dont have a real light sensor, Is there a way to install a "Virtual Ambient Light Sensor" on Windows 8?
user962284
  • 670
  • 1
  • 12
  • 29
4
votes
3 answers

How to detect infrared light with OpenCV

I'm trying to use OpenCV to detect IR point using in-built camera. My camera can see infrared light. However I don't have a clue how to distinguish between visible light and IR light. After transformation to RGB we can't distinguish, but maybe…
Zbigniew Wazeliniak
  • 1,101
  • 2
  • 8
  • 9
4
votes
2 answers

Does iPhone allow Light sensors as input?

I was just wondering whether iPhone developement allows light sensors to be used, as buttons or action elements?? I found this link online... Possible to use Light Sensor as a Button? [Archive] - Touch Arcade If anyone could shed some light on the…
Divanshu
  • 49
  • 1
  • 3
3
votes
2 answers

How to access database in lightswitch in other class?

I just don't know how to explain this clearly. So I create a simple image pattern of what I did. My question is, how would I be able to access my database in other class in LS? I've been searching on net, but I didn't found any solution. I hope…
fiberOptics
  • 6,955
  • 25
  • 70
  • 105
3
votes
1 answer

OpenGL Light Position

I'm having a problem with light's position in opengl. I change the position of the light but the light source is always at the center. this is some code I have... glEnable(GL_LIGHTING); glEnable(GL_LIGHT1); glLightfv(GL_LIGHT1, GL_AMBIENT,…
Henrique Rocha
  • 411
  • 5
  • 13
3
votes
1 answer

Applying masks in C# + XNA?

How do I apply masks in C# + XNA? I want to create a black map, and a flashlight, that it lights stuff up.
Stan
  • 3,659
  • 14
  • 35
  • 42
3
votes
1 answer

OpenGL lighting and shading on a GL_QUAD_STRIP

New to OpenGL, trying to implement a sphere with shading and lighting. I am aware that there is a sphere function I could call on, but trying to create my own. However, while I can get lighting and shading on other objects in the scene (such as…
ElfsЯUs
  • 1,188
  • 4
  • 14
  • 34
3
votes
1 answer

Export painted model from Blender to Three.js

I tried to export GLTF model from Blender to Three.js. It works. But I have some artifacts on Three.js with lighting and painting. I have lines and squares in Three.js and I don't know why. I used only Principled BSDF node in Blender to painting my…
Egettl
  • 85
  • 4
3
votes
1 answer

How does the calculation of the light model work in a shader program?

I am trying to read up this tutorial: https://aerotwist.com/tutorials/an-introduction-to-shaders-part-2/ but I am not able to follow up. Basically the code creates a directional light by using shaders that run directly on the GPU. This is the…
TCM
  • 16,780
  • 43
  • 156
  • 254
3
votes
1 answer

Shadows Distance problems in ThreeJS

I'm currently working with a directionnal ligth for my scene. A small character can move around. All shadows works. But if I start to go a bit further with the avatar, the shadows don't work anymore on it. I think it's may come from the angle of the…
3
votes
3 answers

Is it possible to make dark "light" in unity?

This quiestion may be dumb, but is there a way to create a pointlight in unity2d that darkens instead of producing light? I'm using URP by the way.
Artur D
  • 89
  • 1
  • 6
3
votes
1 answer

OpenGL lighting with glOrtho

So I have a 3D object that I'm drawing with the following light: GLfloat light_diffuse[] = {1.0, 1.0, 1.0, 0.9}; /* White light. */ GLfloat light_position[] = {300.0, 300.0, 300.0, 0.0}; …
seb
  • 2,136
  • 3
  • 20
  • 27
3
votes
1 answer

Error: A value of type 'AppStateNotifier' can't be assigned to a variable of type 'Widget

Following this tutorial. https://itnext.io/app-theming-in-flutter-dark-mode-light-mode-27d9adf3cee void main() { WidgetsFlutterBinding.ensureInitialized(); SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, …
FlutterDev008
  • 79
  • 3
  • 9
3
votes
2 answers

Unity's Universal Render Pipeline performance problem? (2D)

I never got real answer for this. I open this new empty project (total blank but with one GameObject) I ended up getting 2500FPS, alright? Makes sense. The moment I install URP and then you know place in the graphics asset. BAM 1100FPS. What's…
Afidable
  • 39
  • 1
  • 2
3
votes
1 answer

2D Lighting directional shadows?

So I'm making a 2D game and want "realistic" lighting effects. I'm using the 2D lighting that comes with the LWRP Package i saw in this video: https://www.youtube.com/watch?v=nkgGyO9VG54 Now it looks like this: But i want my objects to throw…
CherryFake
  • 125
  • 1
  • 10