Search found 2841 matches

by slime
Thu Oct 29, 2020 12:59 am
Forum: Support and Development
Topic: Reversing gamma correction to get accurate linear color values
Replies: 5
Views: 207

Re: Reversing gamma correction to get accurate linear color values

You can use something like this until love's sRGB support in imagedata's format APIs gets some changes: function newImageFromCanvas(canvas) local linear = canvas:getFormat()~= "srgba8" and lg.isGammaCorrect() return lg.newImage(canvas:newImageData(), {linear=linear}) end It's not really a code bug i...
by slime
Wed Oct 28, 2020 8:22 pm
Forum: Support and Development
Topic: Reversing gamma correction to get accurate linear color values
Replies: 5
Views: 207

Re: Reversing gamma correction to get accurate linear color values

A way to selectively disable gamma correction for some Canvases does not seem to exist. It does - see the PixelFormat wiki page. The default pixel format for Canvases if you don't give your own value is "normal", which selects between rgba8 and srgba8 depending on whether gamma correction is active...
by slime
Sun Oct 25, 2020 12:11 am
Forum: Support and Development
Topic: Is DDS cross platform? (+ related question)
Replies: 2
Views: 153

Re: Is DDS cross platform? (+ related question)

The DDS container file format was created by microsoft but isn't restricted to microsoft-systems. The texture formats that .dds files can store (DXT and BCn mainly) weren't originally created by MS for the most part. All desktop and console GPUs natively support DXT formats (and modern desktop GPUs ...
by slime
Sat Sep 26, 2020 10:18 pm
Forum: Support and Development
Topic: Developer Cannot Be Identified macOS Catalina
Replies: 2
Views: 505

Re: Developer Cannot Be Identified macOS Catalina

Try right/control clicking the love app and click the Open option in the popup dialog. The Unverified developer popup should show an additional "Open" option which you can press. Subsequent use of the love app won't need that step after it's done once. https://support.apple.com/en-ca/guide/mac-help/...
by slime
Tue Sep 22, 2020 1:23 am
Forum: Support and Development
Topic: iOS Build xCode 12 Errors
Replies: 6
Views: 1195

Re: iOS Build xCode 12 Errors

I pushed this change to the github repository which should fix it, let me know if it works for you: https://github.com/love2d/love/commit/6 ... 4677a0cd7e
by slime
Mon Sep 14, 2020 10:34 pm
Forum: Support and Development
Topic: 'untrusted' code
Replies: 10
Views: 3833

Re: 'untrusted' code

Using setfenv with carefully selected functions to expose (without reducing functionality so much that the types of add-ons are limited significantly) and preventing bytecode from being loaded by add-ons has worked pretty well for Vendetta Online , which is a MMOFPS that has had client side Lua add-...
by slime
Mon Sep 14, 2020 11:21 am
Forum: Ports
Topic: Love.js - A Direct Emscripten Port
Replies: 178
Views: 165413

Re: Love.js - A Direct Emscripten Port

If you use scissors, you might need to specify some setCanvas flags. Like the *boolean stencil (false)* on this page: https://love2d.org/wiki/love.graphics.setCanvas Much like the android port, this one is quite picky this things. FWIW, scissors don't need any special setup or setCanvas flags - the...
by slime
Sun Aug 30, 2020 3:55 pm
Forum: Support and Development
Topic: Greyscale image with 1 byte per pixel
Replies: 2
Views: 1652

Re: Greyscale image with 1 byte per pixel

A shader is the only way. Modern GPUs support color component swizzles when creating a texture which would let you do that, but not all GPUs support it and love doesn't provide a way to use that capability at the moment. Here's an example of a basic shader: vec4 effect(vec4 vcolor, Image tex, vec2 t...
by slime
Sat Aug 29, 2020 10:03 pm
Forum: Support and Development
Topic: Multiple Shader and specifically a Moonshine obeservation
Replies: 4
Views: 1763

Re: Multiple Shader and specifically a Moonshine obeservation

Ah, in that case I'd expect most of the performance drop to be caused by the specific effects you're using being rendered to screen_width * screen_height number of pixels pixels at least 20 times (a GPU bottleneck, and more than 20 times if the effects are doing more than one full-screen pass). Depe...